Post topics, source code that relate to the Arduino Platform

User avatar
By Amorphous
#92213 Hi,

I am using an ESP-01 module and trying to write an arduino code for it. Problem is that I can't figure out the pin numbers to access GPIO0 and GPIO2.
Image

As per the pinout diagrams online, GPIO0 is pin 5 and GPIO2 is 3 and in some other places, they are being referred to in arduino as pin 0 and 2. Which one is right? Please help, I am confused.
User avatar
By schufti
#92222 the grey numbers in the picture only give the pin# on the module, they are not referenced during programming. In the programm you use the "gpio" numbers in abreviated form: gpio0 = 0, gpio2 = 2 etc
when handling the module hw-wise, you have to know that signals that you generate with digitalWrite(0,HIGH) will appear at pin 5 of the module.