Skip to content

Commit

Permalink
fix(example): properly end Serial when STOP2 mode is used
Browse files Browse the repository at this point in the history
Fixes #110.

Signed-off-by: Frederic Pillon <[email protected]>
  • Loading branch information
fpistm committed Aug 20, 2024
1 parent eb649e0 commit 3924ac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/AlarmTimedWakeup/AlarmTimedWakeup.ino
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ void loop() {
Serial.print("Alarm Match: ");
Serial.print(alarmMatch_counter);
Serial.println(" times.");
Serial.flush();
Serial.end();
digitalWrite(LED_BUILTIN, HIGH);
LowPower.deepSleep();
digitalWrite(LED_BUILTIN, LOW);
LowPower.deepSleep();
Serial.begin(115200);
while (!Serial) {}
}

void alarmMatch(void* data) {
Expand Down

0 comments on commit 3924ac1

Please sign in to comment.