Skip to content

Commit ecd1786

Browse files
committed
Update vrtc-off.md
1 parent 97694f8 commit ecd1786

File tree

1 file changed

+3
-0
lines changed
  • content/hardware/02.hero/boards/uno-r4-wifi/tutorials/vrtc-off

1 file changed

+3
-0
lines changed

content/hardware/02.hero/boards/uno-r4-wifi/tutorials/vrtc-off/vrtc-off.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ void setup() {
4646
Serial.begin(9600);
4747
RTC.begin();
4848
49+
// A fallback time object, for setting the time if there is no time to retrieve from the RTC.
4950
RTCTime mytime(6, Month::NOVEMBER, 2023, 18, 12, 00, DayOfWeek::MONDAY, SaveLight::SAVING_TIME_ACTIVE);
5051
52+
// Tries to retrieve time
5153
RTCTime savedTime;
5254
RTC.getTime(savedTime);
5355
56+
5457
if (!RTC.isRunning()) {
5558
// this means the RTC is waking up "as new"
5659
if (savedTime.getYear() == 2000) {

0 commit comments

Comments
 (0)