logo elektroda
logo elektroda
X
logo elektroda

ESP8266 limiting WiFi connection attempts and deep sleep

pier 741 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 18505490
    pier
    Level 24  
    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?

    Code: C / C++
    Log in, to see the code
    .
  • ADVERTISEMENT
  • #2 18505576
    Anonymous
    Level 1  
ADVERTISEMENT