Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for I2C Realtime Clocks #400

Draft
wants to merge 46 commits into
base: main
Choose a base branch
from

Conversation

chrisib
Copy link
Collaborator

@chrisib chrisib commented Jan 6, 2025

Add a new experimental module to add realtime clock support. Currently testing with a DS3231 module, though the DS1307 should also be compatible.

I'll add an additional contrib script or two that actually make use of this feature before marking this as ready for review. Likely something inspired by Pet Rock and/or Almanac, as both of those make good use of RTC capabilities.

chrisib added 11 commits January 5, 2025 19:12
…on to support additional clocks, including NTP servers (in theory)
…nter is fine with). Re-order methods inside the RealtimeClock class
…ting the time. Move some code around, add a __str__ function to the clock class so we can print the time with print(clock). Add some supporting data structures to get the name of the weekday or month. Validate the datetime tuple before setting the clock.
@chrisib chrisib added firmware Software related issue new script Addition of a new contrib script labels Jan 9, 2025
…in the current month & year, is_leap_year flag. Static methods renamed. Fix a bug in the wonk generation that could result in out-of-bounds errors
…y update time, or for midnight; otherwise use UTC
…y're the same negative length adjustment they won't be wholly synchronized
…ns and only 1 special phase per cycle. Fix a bug where we accidentally swapped waning for waxing in the phase calculations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
firmware Software related issue new script Addition of a new contrib script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants