: Designed to leverage the DS1302's ability to run on less than 1µW of power when using a backup battery. Installation Guide
Does not consume a large amount of Arduino memory.
Serial.print(2000 + myRTC.year);
From a practical standpoint, the library operates like a streamlined driver: it translates high-level commands from your Arduino sketch (like reading the current hour) into the specific low-level commands the DS1302 understands, and vice-versa. Many online tutorials and projects refer to a ZIP file named virtuabotixRTC.zip as the original source, though it is now primarily known to be maintained and accessible through a popular GitHub repository hosted under chrisfryer78/ArduinoRTClibrary .
// Define the RTC pins const int rtcClockPin = 2; const int rtcDataPin = 3; const int rtcRstPin = 4; virtuabotixrtch arduino library
The VirtuabotixRTC library is a popular Arduino library used to interface with Real-Time Clock (RTC) modules, most notably the DS1302. It allows Arduino microcontrollers to keep accurate time even when disconnected from a power source or when the main microcontroller is reset.
Once the library is installed and your DS1302 is wired up, you can run a simple sketch to see it in action. Here is a basic, well-documented example: : Designed to leverage the DS1302's ability to
// --- SETTING THE TIME (Do this only once) --- // The function: myRTC.setDS1302Time(seconds, minutes, hours, dayOfWeek, dayOfMonth, month, year) // Note: The year is a full 4-digit integer (e.g., 2026). // This line sets the time to January 1, 2026, 12:00:00 on a Thursday. myRTC.setDS1302Time(00, 00, 12, 5, 1, 1, 2026);
Drag the ball to aim, release to shoot.
Reach the top using fewest strokes.
Land on flags to save progress.