esp8266-react icon indicating copy to clipboard operation
esp8266-react copied to clipboard

ESP32 light sleep mode and WiFi on/off

Open king2 opened this issue 2 years ago • 0 comments

Hi!

I need sometimes to shutdown WiFi, and start it again, in two cases:

  1. going to light sleep to consume less energy
  2. sometimes I need to start MCU without WiFi, run, then (later) start WiFi by external command, and then stop it again (activate interface, configure, shutdown WiFi and then run on battery without WiFi - when WiFi is not needed)

As I understand, framework has begin() functions, so I need to call "esp8266React.begin(); server.begin();", but how to finish WiFi gracefully so it can be started again (without MCU hard reset in between, just sleep and running like it was loooong delay)?

Thank you in advance!

king2 avatar Jun 10 '22 03:06 king2