-->
Page 1 of 1

ESP8266 WifiManager and going to sleep to save power

PostPosted: Mon Feb 22, 2016 10:49 am
by DinoN
Hi all,

I have ESP8266 ESP-01 running with WifiManager library and doing pretty much what I want.
Now I would like top put it to sleep to save power (idea is to run it from battery).

As it is initially configured as client and is running server (for configuration purposes) what is the procedure to put it to sleep.

I would like to use wifi_set_sleep_type(LIGHT_SLEEP_T). But as WiFiManager is running it is not going to sleep. Also as I run server how do I stop server (server.stop() and server. end() do not exists)

Ultimate goal is to use ultra low power with ESP.deepSleep(microseconds, mode) and with GPIO16 needs to be tied to RST to wake from deepSleep.

Thank you,
DiNo

Re: ESP8266 WifiManager and going to sleep to save power

PostPosted: Tue Feb 23, 2016 6:00 am
by schufti
just a wild guess:
Code: Select allWiFi.mode(WIFI_OFF)
WiFi.setSleepMode(WIFI_LIGHT_SLEEP);
WiFi.forceSleepBegin();
delay(10);