From 8166a9a342974677263af489398c1f9586e31d20 Mon Sep 17 00:00:00 2001 From: Sebastian Romero Date: Tue, 7 May 2024 15:40:24 +0200 Subject: [PATCH] Rework low power example --- .../DeepSleep_WakeFromRTC_C33.ino | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/examples/DeepSleep_WakeFromRTC_C33/DeepSleep_WakeFromRTC_C33.ino b/examples/DeepSleep_WakeFromRTC_C33/DeepSleep_WakeFromRTC_C33.ino index 57ec32b..22469cb 100644 --- a/examples/DeepSleep_WakeFromRTC_C33/DeepSleep_WakeFromRTC_C33.ino +++ b/examples/DeepSleep_WakeFromRTC_C33/DeepSleep_WakeFromRTC_C33.ino @@ -11,9 +11,10 @@ Board board; Charger charger; void setup() { + pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, LOW); + RTC.begin(); - - digitalWrite(LED_BUILTIN, digitalRead(LED_BUILTIN)); manager = PowerManagement(); manager.begin(); @@ -25,10 +26,12 @@ void setup() { if (!RTC.isRunning()) { RTC.setTime(initial_time); - board.sleepFor(0, 0, 1); } - pinMode(LED_BUILTIN, OUTPUT); + digitalWrite(LED_BUILTIN, HIGH); + board.sleepFor(0, 0, 10); + + // Turn LED on to indicate the board is awake digitalWrite(LED_BUILTIN, LOW); }