Virtuabotixrtc.h Arduino Library — Verified
void loop() myRTC.updateTime();
file in old tutorials rather than being easily installable via the official Arduino Library Manager Arduino Forum Technical Summary Implementation Primary Class virtuabotixRTC Communication 3-Wire Serial (Custom) Ease of Use High (for DS1302) Compatibility Primarily AVR (Uno, Nano, Mega) Recommendation virtuabotixrtc.h arduino library
When you first power a new DS1302 chip, the time is random. You must set it. You should only run the setting code once and then comment it out. Writing to the RTC every loop wears out the memory. void loop() myRTC