The use of the ESP8266 in the world of IoT

User avatar
By schufti
#85073 this is exactly what should happen with the modified sketch.
Maybe shorten the delay to ~100ms to have a more direct feedback.
If it gives you high with only the pulldown connected to D7, try reducing it to 2k2.
With D7 connected to 3V3 it should give you a high.

just report back what happens for D7 connectd to 3V3 and D7 only connected to gnd via pulldown resistor.


Code: Select all      o 3V3
      |
       |<  pushbutton
      |
D7----+
      |
      -
     | |   10k pulldown
     | |
      -
      |
------+--- gnd


edit: if there is still the rebbot problem, try using other pin.
with D0 (gpio16) you could even use "pinMode(power, INPUT_PULLDOWN_16);" and spare the external resistor.