Virtuabotixrtch Arduino Library [verified]

char* daysOfWeek[] = "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat";

If your project requires high accuracy (seconds per month drift), consider upgrading to a DS3231 and the RTClib instead. But for most clocks, timers, and data loggers, the DS1302 with VirtuabotixRTC works great. virtuabotixrtch arduino library

lcd.clear(); lcd.setCursor(0, 0); lcd.print("Time:"); lcd.print(myRTC.hours); lcd.print(":"); lcd.print(myRTC.minutes); lcd.print(":"); lcd.print(myRTC.seconds); char* daysOfWeek[] = "Sun", "Mon", "Tue", "Wed", "Thu",

static int lastMinute = -1; myRTC.updateTime(); if(myRTC.minutes != lastMinute && myRTC.minutes % 15 == 0) activateSprinkler(); // runs every 15 minutes lastMinute = myRTC.minutes; char* daysOfWeek[] = "Sun"

void loop() // 1. Read the current time from the chip myRTC.updateTime();