Virtuabotixrtc.h Arduino Library Official

VirtuabotixRTC myRTC(0x68); // typical I2C address for DS1307

First, you must include the library and create an instance of the RTC object. You must define which Arduino pins are connected to the RTC module. virtuabotixrtc.h arduino library

The library uses minimal flash memory, leaving room for complex project logic. | Feature | VirtuabotixRTC | RTClib (Adafruit) |

| Feature | VirtuabotixRTC | RTClib (Adafruit) | DS1302 (Arduino playground) | | :--- | :--- | :--- | :--- | | Supported Chips | DS1302 only | DS1307, DS3231, PCF8523 | DS1302 only | | Interface | 3-wire (bit-bang) | I2C (hardware) | 3-wire (bit-bang) | | Ease of Use | Very easy (no Wire.h) | Moderate (needs Wire.h) | Moderate | | Accuracy Support | No temp compensation | Yes (DS3231) | No | | Active Maintenance | No | Yes (Adafruit) | No | | Memory footprint | ~2-3 KB | ~4-6 KB (plus Wire) | ~2 KB | this library provides a lightweight

Originally written and released by the Virtuabotix team (now maintained in legacy and community forms), this library provides a lightweight, straightforward interface to read and write time data from the DS1302 via a simple 3-wire interface. Unlike its I2C-based cousins, the DS1302 uses a proprietary synchronous serial protocol that this library handles natively.