I’m trying to get sleep mode to work to lower the power usage, however it appears that the core doesn’t like waking up after I put it to sleep.
Without sleep mode, the core stays connected, makes regular POST requests to a server, I can flash it, no issues. When I use sleep mode, the core will come out of sleep periodically and reconnect, although this fails most of the time (usually with slow fading white). I cannot reflash the core in this mode (I need to use USB). Deep sleep doesn’t seem to work either, although I’ll have to retest it again.
Could you describe your setup, e.g. any pheripherals connected to the core, and share the code you are using, and anything else someone might need to reproduce your problem.
I think you won’t see much of a gain if you’re sleeping for 40 milliseconds at a time. You might have more success if you say, wake up for 1 out of every 10 minutes, etc:
Hah, my bad I would bake in a pre-sleep cycle delay, so you can still flash your core, generally I do something like: wake up for ~2 minutes (enough time to get online and for a flash to start), then start sleep / wake cycle.
Have you tried deep sleep instead, does that work better in your scenario?
I can’t use deep sleep because I’m aggregating data once a second, although when I tried it, the results were no better. What I’ve been doing is sleeping for 40 seconds every 60 seconds. The 20 seconds is more than enough time for the core to get online and the POST action seems to succeed, however the core will never flash (except over USB). I assumed that the first thing the Core would do upon connecting every time would be to check if there’s new firmware, however it seems that the core never gets new firmware after going into sleep mode, even after reconnecting.
Ahh, the OTA flash process right now is just like sending any other message to your core, like checking a variable or calling a function, it currently requires your core be online at that moment ready to receive new firmware. Although, that’s a great feature suggestion, queuing up a flash for the next time the core is online… Lemme stew on that one
I also think this is a good idea, if an update is pending, do it when the core connects. Not really possible to do remote firmware updates unless the core is always in full power mode otherwise.
The button override method is another possible solution but not nearly as nice for end users.