Commit f9f995b2 authored by lbernstone's avatar lbernstone Committed by Me No Dev

Flush serial in DeepSleep example to allow print before sleep (#1791)

* Add delay into example to allow print before sleep

* Changed to Serial.flush()
parent c8fe8739
......@@ -40,7 +40,7 @@ void print_wakeup_reason(){
case 3 : Serial.println("Wakeup caused by timer"); break;
case 4 : Serial.println("Wakeup caused by touchpad"); break;
case 5 : Serial.println("Wakeup caused by ULP program"); break;
default : Serial.println("Wakeup was not caused by deep sleep"); break;
default : Serial.printf("Wakeup was not caused by deep sleep: %d\n",wakeup_reason); break;
}
}
......@@ -84,6 +84,7 @@ void setup(){
reset occurs.
*/
Serial.println("Going to sleep now");
Serial.flush();
esp_deep_sleep_start();
Serial.println("This will never be printed");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment