I am have made an pollution/weather station for a school in Paris. Saturday is the inauguration and i still have some problems with my firmware. I am powering my photon through the solar budy from sparkfun, which chargers a 1000 mAh lipo battery and than goes into my photon through the battery shield from sparkfun.
My only problem is that I do not want for the particle to run non-stop, so I am trying to put it into deep sleep. I have look into the reference documentation online but my only problem is that i do not understand when will the particle wake up.
Can any one help me to understand how to put to sleep and wake up the photon ?
Does this: System.sleep(SLEEP_MODE_DEEP,60); mean that the photon would go to sleep and than wake up by its self after 60 seconds or do i need to add an extra object in order to turn it back on.
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.
As such, it is recommended that deep sleep be called only after all user code has completed. The Standby mode is used to achieve the lowest power consumption. After entering Standby mode, the SRAM and register contents are lost except for registers in the backup domain.
The device will automatically wake up and reestablish the network connection after the specified number of seconds.
Note: You can also wake the device “prematurely” by applying a rising edge signal to the WKP pin.
Thank you very much, the information given is really useful
Moors7 - I visited the link. Does the explanation also apply to photon or only electron? Because the documentation talked about Electron. Thank you.
You can select the desired platform in the docs and see what the “targeted” reference says.
Just hit the blue down arrow here
But in general they behave the same. Minor differences are to be expected where the radio modules (Cellular vs. WiFi) differ.