So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By gary_g
#85298 I'm very very new, I have a nodeMDU ESP8266 running a 60 LED WS2812b ring as a clock.

Can someone help me with the following....

Unit flashed and powered on, WiFimanager runs and starts AP. Configure AP unit resets, after 60 seconds it connects to an NTP server and sets the time on the ring.

CURRENTLY NTP connects every 60 seconds to poll. (This part I can control no problem)

Led colors are set

Void Loop for clock runs

Now the issue....

I want to do all this and disable the Wi-Fi and NTP then after 20 hours WITHOUT restarting the unit, I want to power on Wi-Fi, connect to configured AP in station mode and poll an updated NTP datapack, then return to sleep for another 20 hours.

My understanding is that DEEPSLEEP will not run the void loop section (which actively controls the clock led's)

I'm trying to run a clock and the ESP8266 & nodeMDU and with a maximum of 15 led's on at a time from a 7.4v 2S LIPO battery for as long as I can.

If I run it from an outlet outs not an issue, but this proof of concept of the project needs to be by battery.

Thanks for any help
User avatar
By StanJ
#85667 If you have to keep your loop running, then the only option is Modem Sleep. The current for the module drops by about 50mA when it goes into Modem Sleep, and the CPU is running at ~18mA substrate current.

Looks like you're using the Arduino IDE, so the following will put it to sleep:
Code: Select allWiFi.forceSleepBegin(0xFFFFFFF);  // the modem sleeps until you wake it

and to wake the modem again,
Code: Select all WiFi.forceSleepWake();  // reconnect with previous STA mode and connection settings

I haven't tried that in AP mode, only STA mode.