: When paired with a backup battery (like a CR2032), the RTC keeps time independently of the Arduino's power state.
// Print the time to the Serial Monitor Serial.print("Current Date/Time: "); Serial.print(myRTC.year); // Year Serial.print("/"); Serial.print(myRTC.month); // Month Serial.print("/"); Serial.print(myRTC.dayofmonth); // Day Serial.print(" "); virtuabotixrtc.h arduino library
(Note: You can use any digital pins, just remember to update them in your code). : When paired with a backup battery (like