Questions with regards to ESP8266 Basic and hardware interfacing and control via Basic commands

Moderator: Mmiscool

User avatar
By Charles S
#63415 OK.. I'm A Newbie and this is a very basic question (no pun intended). The ESP-01 has GPIO2 and GPIO0. I'm trying to set and read the status of these pins. I'm using the "io(po,{pin number},1)" command to set the pin HIGH. My question is what are the pin numbers of GPIO2 and GPIO0 on the ESP-01 Board? Are they "2" and "0"? Are they "D3" and "D4" (as labeled on the NODE MCU)?

User avatar
By Charles S
Electroguard wrote:If you look through the online docs you will find that Mmiscool includes a diagram which shows ESP-01 pinout.
It's gpio's are shown and addressed as gpio0 and gpio2.

Thanks. I did see that in the docs. I was trying to read the pins and didn't know how they were labeled. Got it figured out. GPIO0 is "0" (ie. interrupt 0, [do something]). I'm still really new to this. Thanks for putting up with my silly questions.
User avatar
By Electroguard
#64155 No worries.
The original ESP-01 referred to its accessible general purpose input/output pins as gpio0 and gpio2.
Later Esp versions have more gpio's available and come in different packages, so it is less confusing to refer to the input/output pins by their gpio numbers rather than by specific physical pins which may vary from package to package. Nodemcu complicated the situation by inventing their own D number convention for their modules which doesn't correspond to the native Esp-12 gpio's... go figure - but forlotto listed a table of the correspondong pins.