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

  1. Open the Arduino IDE.
  2. Go to Sketch > Include Library > Manage Libraries.
  3. In the search bar, type VirtuabotixRTC.
  4. Find the entry by "Virtuabotix" and click Install.
  1. Download the ZIP file from the official GitHub repository or Arduino Playground.
  2. In the Arduino IDE, go to Sketch > Include Library > Add .ZIP Library.
  3. 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

virtuabotixrtc.h arduino library