I’ve gotten used to using retained variables on my electron-based devices, but now I am switching to the Boron and mesh devices.
It seems like you can’t have retained variables on the mesh devices like you could with the Electron, but certainly there is a way? For example on my Electron devices I will setup a retained int for
log_interval and set it remotely using a particle variable. This way when it wakes up from sleep (
SLEEP_MODE_DEEP on the Electron) it remembers what the
log_interval was set to and continues to function as intended. I am sure there is a way to do this on the mesh series devices, I just don’t know how!
SLEEP_MODE_DEEP sleep on the Boron cannot keep track of time to wake itself up, so I think I will just be using the “stop mode” sleep
System.sleep(pin, edge, timeout)… perhaps this sleep mode retains all RAM… but I’d still like to know how to retain variables if the device is shut off, like with the EN pin for example…
I have seen a couple other posts about thus topic but they all seem to die out before we get a hard answer?
Thanks for the help.