Example sketches for the new Arduino IDE for ESP8266

Moderator: igrr

User avatar
By PB1712
#47647
samialfarra wrote:Thank you Ray . I want to know can read digital pin in ESP 01 that have only gpio 0 and gpio 2 like digital pin in arduino

Yes you can set I/O state for GPIO-2, which can be made high low through GPIO-0. You can drive relay, LED by connecting it on GPIO-2.
User avatar
By Barnabybear
#47654 Hi, you can also use GPIO 1 & 3 (by default Tx & Rx). I quite often use GPIO 3 if I need an extra pin or if the pullups on GPIOs 0 & 2 make things hard work. You can still debug with just Tx.
The functions are about half way down this page
wiki/doku.php?id=esp8266_gpio_pin_allocations