AceTime
1.7.3
Date and time classes for Arduino that support timezones from the TZ Database, and a system clock that can synchronize from an NTP server or an RTC chip.
|
A class that reads and writes HardwareDateTime and HardwareTemperature from a DS3231 RTC chip. More...
#include <DS3231.h>
Public Member Functions | |
DS3231 () | |
Constructor. | |
void | readDateTime (HardwareDateTime *dateTime) const |
Read the time into the HardwareDateTime object. | |
void | setDateTime (const HardwareDateTime &dateTime) const |
Set the DS3231 with the HardwareDateTime values. | |
void | readTemperature (HardwareTemperature *temperature) const |
Read the temperature into the HardwareTemperature object. | |
A class that reads and writes HardwareDateTime and HardwareTemperature from a DS3231 RTC chip.
This class is designed to access just enough features of the DS3231 chip to implement the ace_time::DS3231Clock class. It is not meant to provide access to all the features of the DS3231 chip. There are other libraries which are far better for that purpose.
According to https://learn.adafruit.com/i2c-addresses/the-list, the DS3231 is always on I2C address 0x68, so let's hardcode that.
This class will probably work for the DS1307 and DS3232 RTC chips (except for the temperature function on the DS1307 which lacks this functionality) but this has not been verified.
This class compiles under EpoxyDuino which allows many Clock applications to be configured to use the DS3231Clock, and incorporated into Continuous Integration on GitHub Actions.