Skip to content

rtc.write_datetime(dt_write) seems cannot write the seconds.  #3

@yyw04

Description

@yyw04

i use ds1302_set_utc to set the datetime, usually get the message:
unable to set RTC time

so i checked the code, found this clause cannot fullfill
-2 < (dt_write - dt_read).total_seconds() < +2

so after i call rtc.write_datetime(dt_write), then read time out
dt_read = rtc.read_datetime(), always get the seconds begin from 0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions