#include <DS3232RTC.h> // https://github.com/JChristensen/DS3232RTC
DS3232RTC myRTC;
void setup()
{
Serial.begin(115200);
myRTC.begin();
// set time
/*setTime(23, 31, 30, 13, 2, 2009);
myRTC.set(now()); */
}
void loop()
{
display();
delay(1000);
}
void display()
{
time_t t = myRTC.get();
Serial.print(hour(t), DEC);
Serial.print(':');
Serial.print(minute(t), DEC);
Serial.print(':');
Serial.print(second(t), DEC);
Serial.print(' ');
Serial.print(day(t), DEC);
Serial.print('/');
Serial.print(month(t), DEC);
Serial.print('/');
Serial.println(year(t), DEC);
}