adafruit / Adafruit_CircuitPython_DS3231

Adafruit CircuitPython drivers for the DS3231 realtime clock.
MIT License
21 stars 19 forks source link

Ensure Monday is wday 0 #36

Closed tannewt closed 2 years ago

tannewt commented 3 years ago

Issue brought up on the forum here: https://forums.adafruit.com/viewtopic.php?f=60&t=182751

tekktrik commented 2 years ago

Looking into this, it seems as if the driver code is correct, but the example is wrong. I can confirm this and submit a PR to update the example code. Happy to modify the guide to match if that's possible through Github.

tekktrik commented 2 years ago

Datasheet for reference: https://datasheets.maximintegrated.com/en/ds/DS3231.pdf

It looks like the time is being set correctly since the weekday number is user-defined and auto-increments. The register library seems to be set up correctly here as well, setting Monday as 0 to the register's 1 for first weekday.

tannewt commented 2 years ago

A PR would be great. Some examples are automatically updated in Learn. If this one isn't, then let me know and I can fix it. Thanks!

tekktrik commented 2 years ago

Sounds great! Hardware on the way to dot i's and cross t's, but I can submit the PR to correct the example. :)

tekktrik commented 2 years ago

Should be resolved by #39 !

tannewt commented 2 years ago

Thank you!