AssetTracker Long Battery Life

Im looking for a fairly simple example that no library seems to provide. I need the Electron + AssetTracker to last for a few days at least, so looking for an example that simply powers on GPS + Cellular, obtains GPS, publishes it, then powers down GPS + Cellular and goes into some sort of sleep mode to conserve power and redoes this every 30-60 min.

You could use this GPS sample and just slap in a System.sleep(SLEEP_MODE_DEEP, 60*60); after the device has reported its location.

Ive tried, but system.sleep does not seem to be reliable, sometimes it goes into sleep and never comes out, and other times it just never goes into sleep. Like right now it cycled once and is stuck in sleep mode forever until I reset it.


Is the network standby option buggy?

Nevermind System.sleep(SLEEP_MODE_DEEP, 30);

does not work either…went into sleep and is not coming out of it. Is there a minimum time needed to go into sleep for it to work reliably?

hmmm weird now after fully powering off and on again its seems to be sleeping and waking every 30 seconds properly.