rtc_ds3231 v0.1.2 RtcDs3231
Use a DS3231 real time clock with a nerves system
I have only tested this with a raspberry pi and the sunfounder ds3231 board
References
Summary
Functions
Read the real time clock and return the time as a NaiveDateTime. address
is the 7 bit device address
Set the real time clock from a NaiveDateTime, discarding the century
Functions
Specs
rtc_datetime(byte, integer) :: {:ok, NaiveDateTime}
Read the real time clock and return the time as a NaiveDateTime. address
is the 7 bit device address.
Example:
RtcDs3231.rtc_datetime(0x68)
The chip apperas to store a 2 digit year and flip the century bit when it overflows, hence the need to pass in the century.