The library uses the Arduino wire library.
The RTC must be connected via I2C (aka TwoWire, TWI or simply Wire).
| Arduino | RTC |
|---|---|
| GND | GND |
| +5V | VCC |
| SDA | SDA |
| SCL | SCL |
| SCL | SQW |
An instance of the class "TimeDS3231" is needed. As argument, the constructor expects the I2C address of the RTC (usually 0x3C).
#define RTC_I2C_ADDR 0x3C
TimeDS3231 Rtc(RTC_I2C_ADDR);
This function must be called to initialise the rtc.
Rtc.begin();This function switches off the display.
Rtc.end();This function switches off the display.
Rtc.readDateTime();This function switches off the display.
Rtc.writeDateTime();Version: 5.2
© 1996-2025 by Stefan Trippler (stef2025@[REM0VE]trippler.de)
Impressum