Hmm. Weird… I understood incorrectly from the documentation. I thought SLEEP_MODE_DEEP, did halt execution, but sleep only turns off WIFI radio to conserve energy.
As per Particle documentation:
System.sleep(long seconds) does NOT stop the execution of application code (non-blocking call). Application code will continue running while the Wi-Fi module is in standby mode.
System.sleep(SLEEP_MODE_DEEP, long seconds) can be used to put the entire device into a deep sleep mode. In this particular mode, the device shuts down the network subsystem and puts the microcontroller in a stand-by mode. When the device awakens from deep sleep, it will reset and run all user code from the beginning with no values being maintained in memory from before the deep sleep.
Am I understanding incorrectly… Or is there something missing?