Re: Sleep: board constantly resets when RST and D0 tied
Posted: Wed Jun 22, 2016 4:07 pm
I suggest debugging deep sleep separately. Disconnect other wires and hardware from the NodeMCU. Remove NodeMCU from the breadboard. Connect only RST and D0 using a jumper wire. The only other NodeMCU connection is the USB cable to the PC for power and programming. The following works fine on my Lolin NodeMCU. Arduino IDE 1.6.8.
Code: Select all
/*
Deep sleep test
Pins RST and GPIO #16 shorted
*/
#define SECONDS_DS(seconds) ((seconds)*1000000UL)
#define SERIAL_DEBUG (1)
void setup() {
#if SERIAL_DEBUG
Serial.begin(115200);
Serial.println(F("\nGood morning, ESP"));
#endif
// Give user a chance to get control before going into deep sleep
delay(5000);
#if SERIAL_DEBUG
Serial.println(F("Good night"));
#endif
ESP.deepSleep(SECONDS_DS(10), WAKE_RF_DEFAULT);
// Execution resumes at the top of this function.
delay(100);
}
void loop() {
// This never executes because deep sleep resets the CPU.
}