Virtuabotixrtc.h Arduino Library Site
The virtuabotixRTC.h library is a lightweight, easy-to-use Arduino library specifically designed to interface with the DS1302 Real-Time Clock (RTC) module. It provides a high-level abstraction for setting and retrieving time and date data through a 3-wire serial interface. Core Functionality
// Set time once (comment after first use) // myRTC.setDS1302Time(0, 0, 12, 3, 4, 5, 2026); virtuabotixrtc.h arduino library
- Open the Arduino IDE.
- Go to Sketch > Include Library > Manage Libraries.
- In the search bar, type
VirtuabotixRTC. - Find the entry by "Virtuabotix" and click Install.
- Download the ZIP file from the official GitHub repository or Arduino Playground.
- In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library.
- Select the downloaded file.
Important: The DS1302 requires a backup battery (usually a CR2032) to keep time when the Arduino is unplugged. Ensure the battery is installed and has a charge above 2.5V. The virtuabotixRTC
2. The DS1302 Battery: The DS1302 module has a small silver coin cell battery slot (usually a CR2032). If your clock is losing time when the Arduino is unplugged, check or replace this battery. Open the Arduino IDE