Hi,
I have this statement as part of a code running on my Electron. Code is compiled locally using the new Particle Workbench.
if(variable == 1) //lowest power consumption, reboots the device from start
{
Serial.println("Entering Sleep Mode");
System.sleep(SLEEP_MODE_SOFTPOWEROFF, seconds, SLEEP_DISABLE_WKP_PIN);
}
No text is displayed on my serial monitor. Yet adding a 1ms deplay makes the message displayed correctly
if(variable == 1) //lowest power consumption, reboots the device from start
{
Serial.println("Entering Sleep Mode");
delay(1);
System.sleep(SLEEP_MODE_SOFTPOWEROFF, seconds, SLEEP_DISABLE_WKP_PIN);
}
Is it due to some asyncronicity in println() or compiler optimization option?
Thanks
Simone