18s wakeup time from deepsleep
-
When main.py runs after a deepsleep, the 2nd line (after the imports) is
start=utime.ticks_ms()the last line in the program is
end=utime.ticks_ms(); diff=end-start; sleep=600-diff; machine.deepsleep(sleep*1000)diff is essentially the time it took for the program to run & I subtract it from 10 mins to get the deepsleep time. I figured this would give me an update every 10 mins, but it actually updates every 10.3mins. I'm thinking the extra 18s must be the time between wakeup & the 2nd line of main.py? 18s seems a long time for main.py to start? Just curious.
-
@kjm The Pycom devices need between 1-2 seconds to start up. There is some analysis of that in the forum, based on the supply current analysis. LTE devices are slower than e.g. the WiPy. I do not know what's in your main.py script. But that one may take some time. LTE.attach() from power on for instance takes at my place 15 seconds and more.
P.S.: Your formula above looks a little bit strange, because in the statement:
sleep=600-diff
you mix physical units. The unit of 600 is implicitly s (seconds), the unit of diff is ms (milliseconds).
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