Logo jurisLogo Bundesregierung

Virtuabotixrtc.h Arduino: Library _hot_

To use this library, you will need a DS1302 RTC module. Wire it to your Arduino as follows:

void loop() // This function updates the variables inside the object with current RTC data myRTC.updateTime();

// Create the myRTC object virtuabotixRTC myRTC(RST, DAT, CLK); virtuabotixrtc.h arduino library

delay(500); // Update display twice a second

Once you have created an instance of the VirtuabotixRTC class, you can use its methods to set and get the date and time. To use this library, you will need a DS1302 RTC module

Provides direct access to individual time elements (like myRTC.hours ) after calling a single update function. How to Install the Library

This library natively reads and writes in 24-hour format. If you want to display 12-hour time (AM/PM), you will need to write a simple if (hours > 12) statement in your code to convert it. How to Install the Library This library natively

#include <virtuabotixRTC.h>

Locate and download the virtuabotixRTC library ZIP file from a trusted repository (such as GitHub). Import via Arduino IDE: Open the Arduino IDE.