Added deep sleep at the end with a 1 minute timer

This commit is contained in:
2026-04-04 15:48:26 -04:00
parent 7e21bde538
commit 74b3e01556
+10 -2
View File
@@ -1,6 +1,8 @@
#include <cassert>
#include <cstdio>
#include "sdkconfig.h"
#include "esp_event.h"
#include "esp_log.h"
#include "esp_system.h"
@@ -8,8 +10,7 @@
#include "freertos/task.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "sdkconfig.h"
#include "esp_sleep.h"
#include "epd.hpp"
#include "led.hpp"
#include "network.hpp"
@@ -88,4 +89,11 @@ extern "C" void app_main()
disconnect_wifi();
shutdown_network();
}
ESP_LOGI(TAG, "Waiting 5 seconds before deep sleep...");
vTaskDelay(pdMS_TO_TICKS(5000));
ESP_LOGI(TAG, "Entering Deep Sleep for 60 seconds...");
esp_sleep_enable_timer_wakeup(60ULL * 1000000ULL);
esp_deep_sleep_start();
}