Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Lopy + Pytrack: How to keep track of time in deep sleep

    Scheduled Pinned Locked Moved LoPy
    lopypytrackdeepsleeprtc
    3 Posts 3 Posters 1.5k Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • joeriJ Offline
      joeri
      last edited by

      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()
      
      J 1 Reply Last reply Reply Quote 0
      • E Offline
        Emmanuel Goudot
        last edited by

        There are some small RTC modules based on DS1307

        1 Reply Last reply Reply Quote 0
        • J Offline
          jmarcelino @joeri
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0

          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
          • 1 / 1
          • First post
            Last post

          Pycom on Twitter

          Pycom