-->
Page 1 of 1

Putting ESP-12E module in Sleep with WebServer

PostPosted: Wed Aug 16, 2017 12:18 am
by jmseight
Hi,

I would like to put my ESP-12E module into either modem sleep mode or light sleep mode while running as a web server. The ESP-12E is connected to an WiFi AP, and is set up as an ESP8266WebServer. Do I put the statement
wifi_set_sleep_type(MODEM_SLEEP_T);
at the end of setup()? What do I have to put into loop() to make sure it goes to sleep. I tried delay(10000) but it hangs in light_sleep, and does not reduce power consumption in modem_sleep. Also, when I click on a button on my web page served from the ESP-12E, it does not respond immeidately but waits until the 10sec is over, so it seems that the web server is not asynchronously handled.

Thanks,
James

Re: Putting ESP-12E module in Sleep with WebServer

PostPosted: Mon Aug 21, 2017 6:51 am
by eduperez
You are not trying to make your ESP respond to requests while in sleep mode, are you?