From ef9d08bdd05f68bd4e73c4089359bd17c2be6660 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Wed, 13 Jun 2018 00:41:41 +0200 Subject: [PATCH] debug output before sleep --- src/main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index eca5ea7..c47fe18 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -327,6 +327,8 @@ void suspend(uint32_t secondsToSleep) { //properly disconnect from the MQTT broker iot.mqtt.disconnect(); + Serial.printf("going to deep_sleep for %u seconds", secondsToSleep); + esp_sleep_enable_timer_wakeup(1000000LL * secondsToSleep); const uint64_t ext_wakeup_rotarybtn_mask = 1ULL << rotaryPinButton; // const uint64_t ext_wakeup_sensor_mask = 1ULL << sensorPin;