Virtuabotixrtch Arduino Library
#include <VirtuabotixRTC.h>
into your module. This ensures that even if your Arduino loses power, the RTC keeps ticking, so you don't have to reset the time every time you reboot. DS1302 vs. DS3231:
: Refreshes the internal variables with the latest data from the RTC module. Typical Wiring (Arduino Uno) virtuabotixrtch arduino library
delay(1000);
: Enables projects to maintain accurate time even when the main Arduino power is lost, provided a backup battery (like a CR2032) is connected to the RTC module. Basic Usage Example #include <VirtuabotixRTC
// Print time to Serial Monitor Serial.print("Time: "); Serial.print(myRTC.hours); Serial.print(":"); Serial.print(myRTC.minutes); Serial.print(":"); Serial.println(myRTC.seconds);
Checking for a specific minute rollover is trivial: the RTC keeps ticking
Download the ZIP file from a repository like chrisfryer78's GitHub .