File tree 1 file changed +5
-10
lines changed
libraries/RTC/examples/RTC_Reset 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * RTC_AutomaticExample
2
+ * RTC_Reset
3
3
*
4
- * This example sets the RTC (Real Time Clock) on the Portenta C33 automatically by
5
- * retrieving the date and time from the computer you upload the sketch from, at the
6
- * point when you start the upload.
7
- *
8
- * Next, it gets the current time from the RTC and prints it to the Serial Monitor.
9
- * It then sets an RTC alarm to fire every time the seconds value of the time is zero.
10
- * The alarm, which now goes off once a minute, triggers a callback that prints the
11
- * current time to the Serial Monitor.
4
+ * This example sets the RTC with __TIMESTAMP__ macro and can be used to test whether the settings of
5
+ * RTC persists after a reset or when VRTC is powered. If VRTC is powered I can disconnect the board
6
+ * from the usb cable and the RTC value will persist
12
7
*
13
8
* Find the full UNO R4 WiFi RTC documentation here:
14
9
* https://docs.arduino.cc/tutorials/uno-r4-wifi/rtc
@@ -148,7 +143,7 @@ void setup()
148
143
// Initialize the RTC
149
144
RTC.begin ();
150
145
151
- // Get the current date and time when the sketch is uploaded and set the RTC
146
+ // if the RTC is not running set its value to the compile time __TIMESTAMP__ macro
152
147
if (!RTC.isRunning ()) {
153
148
RTCTime timeToSet = currentRTCTime ();
154
149
RTC.setTime (timeToSet);
You can’t perform that action at this time.
0 commit comments