Welcome.
I have an ESP8266 based weather sensor powered by a solar assisted battery. The esp is most of the time in deep sleep, wakes up every 30min or so and sends measurement data.
The problem occurs when the esp doesn't see the wifi network, then instead of going to sleep after trying to connect indefinitely I guess it tries to connect and drains the battery unnecessarily.
How do I make the ESP make say five attempts at intervals of a few seconds and if it fails to connect go to sleep for another 30min?
.
I have an ESP8266 based weather sensor powered by a solar assisted battery. The esp is most of the time in deep sleep, wakes up every 30min or so and sends measurement data.
The problem occurs when the esp doesn't see the wifi network, then instead of going to sleep after trying to connect indefinitely I guess it tries to connect and drains the battery unnecessarily.
How do I make the ESP make say five attempts at intervals of a few seconds and if it fails to connect go to sleep for another 30min?
Code: C / C++