Added deep sleep after work done
This commit is contained in:
parent
03dec075d1
commit
0f36538ec0
@ -6,6 +6,7 @@
|
||||
#define UNCOLORED 1
|
||||
|
||||
Epd epd;
|
||||
int DEEP_SLEEP_TIME_uS = 6 * 60 * 60 * 1000 * 1000; // time to deep sleep in microseconds (not milliseconds!)
|
||||
|
||||
// WiFi
|
||||
char wiFiSSID[] = "SSID"; // SSID of your network
|
||||
@ -41,6 +42,11 @@ void setup() {
|
||||
String html = getHTML();
|
||||
|
||||
showDailyText(getLosungFromHTML(html), getLehrtextFromHTML(html), getLosungSourceFromHTML(html), getLehrtextSourceFromHTML(html));
|
||||
|
||||
// deep sleep for 6 hours
|
||||
esp_sleep_enable_timer_wakeup(DEEP_SLEEP_TIME_uS);
|
||||
Serial.printf("[ESP32] Going to deep sleep mode.\n");
|
||||
esp_deep_sleep_start();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
|
Loading…
Reference in New Issue
Block a user