Lopy + Pytrack: How to keep track of time in deep sleep
-
Hi!
I'm wondering how I can keep track of the time (seconds since power on) when putting the Pytrack board in deep sleep. As far as I understood the board is completely powered down by the Pytrack, thus the RTC will be reset? Is there a RTC available on the Pytrack?
I'm using deep sleep through:
from pytrack import Pytrack pytrack = Pytrack() pytrack.setup_sleep(10) # sleep for 10 seconds pytrack.go_to_sleep() -
There are some small RTC modules based on DS1307
-
@joeri
How accurate does it need to be?You could store the time before entering deep sleep and then when the board comes back you'd know it's the stored value + your deep sleep time + small adjustment to account for boot-up (which on my tests is about 1.9s but you should check for yourself)
That should quickly give you a good approximation. Of course on the Pytrack you can get then get the GPS time.
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