awake¶
The loop of awake mode.
While the board is on external power it stays up, serves the web interface and keeps the display current without deep sleep.
Functions¶
|
Loop until the board runs on battery again. |
Module Contents¶
- awake.run(now_s, on_external_power, poll, update_header, fetch_due, fetch, check_s=5)¶
Loop until the board runs on battery again.
now_s()returns the time in seconds,poll(timeout_s)serves web requests for that long. Everycheck_sseconds the power source is checked; data is fetched whenfetch_due()says so, otherwise the header is updated once per minute.