AceTime
0.8
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. More... | |
void | readDateTime (HardwareDateTime *dateTime) const |
Read the time into the HardwareDateTime object. More... | |
void | setDateTime (const HardwareDateTime &dateTime) const |
Set the DS3231 with the HardwareDateTime values. More... | |
void | readTemperature (HardwareTemperature *temperature) const |
Read the temperature into the HardwareTemperature object. More... | |
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.
|
inlineexplicit |
void ace_time::hw::DS3231::readDateTime | ( | HardwareDateTime * | dateTime | ) | const |
Read the time into the HardwareDateTime object.
Definition at line 22 of file DS3231.cpp.
void ace_time::hw::DS3231::readTemperature | ( | HardwareTemperature * | temperature | ) | const |
Read the temperature into the HardwareTemperature object.
Definition at line 38 of file DS3231.cpp.
void ace_time::hw::DS3231::setDateTime | ( | const HardwareDateTime & | dateTime | ) | const |
Set the DS3231 with the HardwareDateTime values.
Definition at line 48 of file DS3231.cpp.