Resume program at position after sleep mode?
-
Hi,
I have a rather big program that has quite a few functions. I would also like to save some battery and therefore I want to send my M5Stack into sleep mode.Program start;
execute SETUP() once: function A(), function B(), C();LOOP(): function D(), function E(), START HERE SLEEP.
When sleep is over, my program starts again at the beginning executing the SETUP() function. Is there any way to resume my program where it stopped? Like with the next line of code or with the next function? I do not want to start again at setup().
LOOP(): function D(), function E(), START HERE SLEEP; Wake up from sleep; Resume with function F(), function G(). Start again with LOOP() function D(), E(), sleep,...
-
light sleep should do the job, but I have to do some testing.
Are there any data or "connections" lost after you wake up from light sleep?
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login