Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By Rocco
#12684 I've recently started experimenting with the ESP-07 module, I'm currently running NodeMCU with a webserver based on Rui Santos' code found at http://randomnerdtutorials.com/esp8266-web-server/ . I have 3 LEDs hooked up to 3 GPIO pins through 2.2 Kohm resistors and I've noticed something which may cause problems if I try to do more with it than merely turn LEDs on and off specifically, the LEDs on the GPIO pins glow slightly for about a second or so while the device is powering up. Is this normal? And what's the best way of suppressing it?

P.S. I 'm not entirely sure if I'm posting this in the right place as I'm not sure if it's a hardware problem or a firmware problem
User avatar
By pzw
#12696 This is not a "problem" most likely. Most micro controllers change their IO pins during bootup to input mode. If the input mode involves pull-up resistors then it is very well possible that the LED lights up because of the current through the pull-up resistor to the LED.
User avatar
By lethe
#12698 If I read this table correctly, most GPIOs are indeed inputs with internal pull-ups enabled at reset (except for GPIO4/5 & the SPI pins). To circumvent your problem, try connecting the LEDs to the GPIOs as sink (ground), not as source. This way the LEDs will light when the GPIO is low, so they should not light during reset.
User avatar
By Rocco
#12704 Connecting the GPIOs to sink solves the problem. For what I have in mind that's little bit inconvenient but quite doable. Thanks.