-->
Page 1 of 1

ESP-01 pin number confusion

PostPosted: Mon Sep 06, 2021 10:04 am
by Amorphous
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.

Re: ESP-01 pin number confusion

PostPosted: Tue Sep 07, 2021 12:31 am
by JurajA
for io 0 use 0, for io 2 use 2 ...

Re: ESP-01 pin number confusion

PostPosted: Tue Sep 07, 2021 2:46 am
by schufti
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.