User Tools

Site Tools


esp8266:how-to-use-all-esp01-gpio-pins

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
esp8266:how-to-use-all-esp01-gpio-pins [2019/10/06 15:26]
Ilias Iliopoulos [Introduction]
esp8266:how-to-use-all-esp01-gpio-pins [2019/10/23 15:24]
Ilias Iliopoulos [Introduction] WeeMos D1 to WeMos D1
Line 13: Line 13:
 Finally, only GPIO2 pin remains as a pin to be used for general purpose input/​output,​ and even this under specific conditions. Finally, only GPIO2 pin remains as a pin to be used for general purpose input/​output,​ and even this under specific conditions.
  
-There are of course several ways to bypass the problem. The easiest by far is to dump ESP-01 and use one of the several modules, such as the ESP-07 or ESP-12, or one of the development platforms such as NodeMCU, ​WeeMos ​D1 etc. which provide a larger number of GPIO pins. But, engineers are notorious for trying to squeeze every drop of juice, especially when our project requires only minimal resources, or when we have several spare ESP-01 modules in our lab bins.+There are of course several ways to bypass the problem. The easiest by far is to dump ESP-01 and use one of the several modules, such as the ESP-07 or ESP-12, or one of the development platforms such as NodeMCU, ​WeMos D1 etc. which provide a larger number of GPIO pins. But, engineers are notorious for trying to squeeze every drop of juice, especially when our project requires only minimal resources, or when we have several spare ESP-01 modules in our lab bins.
  
 In this article, I will show you how to use all the available pins of ESP-01, in a couple of use cases. The article present only "​how"​ it is done and not the details of "​why"​ it is done like this. Please consult the official documentation to find additional information. Unfortunately,​ the popularity of the ESP8266 has made most of us learn the ESP-8266 platform mostly through articles and experimentation,​ rather than studying the lengthy documentation,​ and therefore, it is not my intention to present information that is not 100% correct. In this article, I will show you how to use all the available pins of ESP-01, in a couple of use cases. The article present only "​how"​ it is done and not the details of "​why"​ it is done like this. Please consult the official documentation to find additional information. Unfortunately,​ the popularity of the ESP8266 has made most of us learn the ESP-8266 platform mostly through articles and experimentation,​ rather than studying the lengthy documentation,​ and therefore, it is not my intention to present information that is not 100% correct.
Line 113: Line 113:
  
 See the circuit below. The series resistors provide some safety from short-circuiting a pin in case both sides operate as outputs, before our code takes over. See the circuit below. The series resistors provide some safety from short-circuiting a pin in case both sides operate as outputs, before our code takes over.
 +
 +{{ :​esp8266:​esp01_txrx.png |}}
  
 In terms of software, in order to force pins TXD/GPIO1 and RXD/GPIO3 to operate as I2C pins functioning as SDA and SCL respectively,​ we must set in our code: In terms of software, in order to force pins TXD/GPIO1 and RXD/GPIO3 to operate as I2C pins functioning as SDA and SCL respectively,​ we must set in our code:
esp8266/how-to-use-all-esp01-gpio-pins.txt ยท Last modified: 2024/02/02 21:49 by Ilias Iliopoulos