Re: Code for GPIO ESP8266
Posted: Sun Jul 18, 2021 8:50 pm
Hi, you can add the following lines in the void setup()
Here, I have used the D1 (GPIO-5) as OUTPUT, if you use another GPIO pin then replace it with that.
For the INPUT add
Some GPIOs have limitations, if you make them HIGH or LOW during the booting process, the BOOT will fail.
You can refer to the following picture for that.
You can also refer to the following article
https://easyelectronicsproject.com/esp3 ... fi-manual/
Code: Select all
pinMode(D1, OUTPUT);
digitalWrite(D1, LOW);
Here, I have used the D1 (GPIO-5) as OUTPUT, if you use another GPIO pin then replace it with that.
For the INPUT add
Code: Select all
pinMode(D1, INPUT);
Some GPIOs have limitations, if you make them HIGH or LOW during the booting process, the BOOT will fail.
You can refer to the following picture for that.
You can also refer to the following article
https://easyelectronicsproject.com/esp3 ... fi-manual/