Virtuabotixrtc.h Arduino Library !!hot!! Jun 2026
It allows you to access individual time components like seconds, hours, or days of the week independently. Hardware Configuration: Wiring the DS1302 to Arduino
void setup() rtc.setDateTime(2022, 7, 25, 10, 30, 0); virtuabotixrtc.h arduino library
The VirtuabotixRTC library is exemplary in its minimalist design. It provides only the essential functions needed for basic RTC operations, which contributes to its small memory footprint—an important consideration for ATmega328P-based boards like the Arduino Uno with limited SRAM. It allows you to access individual time components
setDS1302Time(seconds, minutes, hours, dayofWeek, dayofMonth, month, year) — Writes new time parameters to the chip. This RAM is separate from the time registers
// The library provides these variables with the current time: Serial.print("Current Date / Time: "); Serial.print(myRTC.dayofmonth); Serial.print("/"); Serial.print(myRTC.month); Serial.print("/"); Serial.print(myRTC.year); Serial.print(" "); Serial.print(myRTC.hours); Serial.print(":"); Serial.print(myRTC.minutes); Serial.print(":"); Serial.println(myRTC.seconds);
Most users ignore the 31 bytes of NV RAM on the DS1302. However, VirtuabotixRTC.h exposes this through writeRAM() and readRAM() . This RAM is separate from the time registers and retains data as long as backup power is supplied.