02_sleep.ino 216 B

12345678
  1. void deepSleep() {
  2. hideProgress(); // Make sure the LEDs are turned off
  3. debuglog("Going to sleep for: ", SLEEP_TIME_US);
  4. esp_sleep_enable_timer_wakeup(SLEEP_TIME_US);
  5. Serial.flush();
  6. esp_deep_sleep_start();
  7. }