Skip to content

Commit 3924ac1

Browse files
committed
fix(example): properly end Serial when STOP2 mode is used
Fixes #110. Signed-off-by: Frederic Pillon <[email protected]>
1 parent eb649e0 commit 3924ac1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

examples/AlarmTimedWakeup/AlarmTimedWakeup.ino

+3-1
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,13 @@ void loop() {
6969
Serial.print("Alarm Match: ");
7070
Serial.print(alarmMatch_counter);
7171
Serial.println(" times.");
72-
Serial.flush();
72+
Serial.end();
7373
digitalWrite(LED_BUILTIN, HIGH);
7474
LowPower.deepSleep();
7575
digitalWrite(LED_BUILTIN, LOW);
7676
LowPower.deepSleep();
77+
Serial.begin(115200);
78+
while (!Serial) {}
7779
}
7880

7981
void alarmMatch(void* data) {

0 commit comments

Comments
 (0)