nodemcu / nodemcu-firmware

Lua based interactive firmware for ESP8266, ESP8285 and ESP32
https://nodemcu.readthedocs.io
MIT License
7.68k stars 3.13k forks source link

before load init.lua all GPIO are OUTPUT HIGH #1375

Closed ozyart closed 8 years ago

ozyart commented 8 years ago

Before init.lua load, all GPIO OUTPUT are HIGH. I need all GPIO in LOW before load init.lua

I hope one solution, thanks

NodeMCU version

NodeMCU 0.9.5 build 20150318 powered by Lua 5.1.4

Hardware

ESP8266 12E

devsaurus commented 8 years ago

My guess would be that all GPIOs power-up with their pull-up resistors enabled for safe operation. Even though GPIOs could be set to drive LOW quite early in the start-up process, there would be always this initial phase.

How long can your use case tolerate that all GPIOs are HIGH before they're driven LOW by software?

ozyart commented 8 years ago

I test it with diferent resistors and diodes.

When I turn the esp12 UP, All GPIO are HIGH during 1 second. When read init.lua everyone go to LOW. I need this always start in LOW.

ozyart commented 8 years ago

All GPIO load with 1.73V, and if I don't define GPIO to OUTPUT this doesn't go to 0V With leds you doesn't see the problem, but with transistors and relays or one multi meter the problems can be see at esp12 start.

marcelstoer commented 8 years ago

We had this a few times before e.g. #897. It's down to the hardware specs and the Espressif SDK. NodeMCU 0.9.x is no longer supported.

ozyart commented 8 years ago

how I resolve that?

nickandrew commented 8 years ago

Perhaps you could invert the logic in your hardware so starting high is OK.

ozyart commented 8 years ago

I will go try probe the last version of nodeMCU

ozyart commented 8 years ago

last version work fine!

SupotSaeEa commented 8 years ago

Use last version 1.5.4.1. The problem still occurred.