ben-hawks / BadOS

CircuitPython Mini Operating System for Pimoroni Badger2040 Electronic Badge
GNU General Public License v3.0
1 stars 2 forks source link

Add Support for RTC #8

Open ben-hawks opened 1 year ago

ben-hawks commented 1 year ago

The Badger2040w uses a pcf85063a Real Time Clock to manage extreme low power states, allowing for the badge to sleep (without the pico w turning on) for up to 1 month.

Basic support is already implemented in the CircuitPython firmware for the Badger 2040W, backing the built in rtc module, which is subsequently used to back the time and alarms modules, but further functionality and improvements are possible.

Minimum features

set the pcf85063a alarm to a given amount of time in the future ability to use RTC value for alarms, checking and resetting the alarming flag

Intended features

(if wifi implemented) Sync RTC time with NTP server sleep/deep sleep support using rtc alarms

Long term features

Ultra deep sleep (fully powering off the pico) until pcf85063a alarm or user interaction

ben-hawks commented 6 months ago

First pass at support for this exists within BadOS_RTC.py, but things need to be validated and potentially extended.

updating to be "important" vs "critical", as the badge functions fine, but has high battery usage due to not supporting RTC backed deep sleep/power states atm