- I have tested this on a WeMos Mini, a NodeMcu 0.9 board and a normal sized WeMos board.
- I have completely reflashed all of them before testing, and they behave the same.
- In order to rule out all possible errors, I have used the bare dev boards (e.g. only the USB cable and the GND -> GPIO2 line was connected, nothing else.)
I was digging through information on GPIO pins and found this:
https://community.blynk.cc/t/esp8266-gp ... es-8/22872
There are certain restrictions about GPIO pins on ESP8266, but in particular GPIO2 (D4) is said to be a "safe pin, first choice". That page also says that GPIO2 is initially LOW. On two of my dev boards, GPIO2 is connected to a LED and it is active LOW (e.g. if I connect GPIO2 to GND, then the LED lights up.) It indicates that GPIO2 is either initially HIGH, or (more probably) it is initially an input pin with a possible pull up or pull down resistor. In any case, it does not seem to be an initially LOW (output) pin. I suspected that this pin might be an initially HIGH output pin, so I have also tried to put a 2.2k resistor between GND and GPIO2 but it did not help either (e.g. won't boot).
Here are some questions:
- Is there something in MicroPython that prevents GPIO2 pin from using as an (initially LOW) input PIN? Was it somehow configured in the firmware as an output pin (initially)?
- Or maybe this is a "feature" of my dev boards, and not the ESP module itself?
- Is it a known phenomenon (for either dev boards or bare ESP modules)?