My project sends data once every half an hour using the following command:
“Particle.publish(“SendByteKeeperData”, bigstr, PRIVATE, NO_ACK);”
After this I then use the following to put the device into deep sleep:
Despite its name, “bigstr” is actually only 26 characters long. Doing this I am using 0.1MB of data every 12 hours, which seems like a lot to me.
The NO_ACK is new, I tried adding that with no change in data usage. Meaning it must not be the responses/retries that are using up my data. Because I am using SLEEP_MODE_DEEP I am now suspecting it may be all the handshaking. I want to try a different mode (I actually have an excess of power so I have room to play with). However I have confused myself big time with regard to regular sleep mode.
“System.sleep() can be used to dramatically improve the battery life of a Particle-powered project by temporarily deactivating the Wi-Fi module, which is by far the biggest power draw.”
But that would require a handshake upon wake-up no? But wait there is a solution: SLEEP_NETWORK_STANDBY
BUT per documentation:
"The Electron maintains the cellular connection for the duration of the sleep when SLEEP_NETWORK_STANDBY is given as the last parameter value. On wakeup, the device is able to reconnect to the cloud much quicker, at the expense of increased power "
So, now I am confused the SLEEP_NETWORK_STANDBY appears to undo the one thing the regular sleep mode does. Help please!
Also, if I do use System.sleep() and I dont want my code looping for the duration of the sleep, is there a more elegant solution than using delay, or telling it to look for a rising edge on a grounded pin for 30 min?