3

I have a NodeMCU board connected to a door and there is a micro switch that makes one GPIO pin (GPIO15 - D8 in this specific case) go high when the door opens.

My problem is if I lose power while the door is opened, the GPIO15 is fed high at the next boot when power is restored. And it makes the board go to a not responding state. I have to boot it again while the door is closed (pin is low) to bring it back to work. I experienced this while flashing too. I cannot flash while this pin is high (while the door is open).

How can I fix this?

dda
1,5951 gold badge12 silver badges17 bronze badges
asked Apr 9, 2017 at 18:28
0

1 Answer 1

10

Certain pins of the ESP8266 perform special functions at bootup. GPIO15, when HIGH, makes the ESP8266 boot from an SD card.

You can read more about the special functions of the pins here.

The solution? Don't use GPIO 0, 2 or 15 for things that can affect the boot sequence.

answered Apr 9, 2017 at 18:32

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.