Open JoseCintra opened 6 years ago
For the 1) question: check year, if it is 00, it was powered for the first time:
DateTime MyTimestamp;
MyTimestamp = Clock.read();
if (MyTimestamp.Year==00) {
Clock.promptForTimeAndDate(Serial);
} else {
Serial.print(F(" * RTC time: "));
Clock.printTo(Serial);
}
Hi! Which method should I use to know: 1) first time i ran and the device wasn't running yet 2) the battery on the device is low or even missing Some libraries have the method "isrunning" or "lostPower"...
Thanks