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

    testing machine deepsleep

    Scheduled Pinned Locked Moved GPy
    gpydeep sleep
    4 Posts 2 Posters 1.1k 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.
    • S Offline
      serafimsaudade
      last edited by

      import machine
      import pycom
      import os
      import time
      
      i=True
      while i==True:
          print('normal mode 5sec')
          time.sleep(5)
          i = False
      
      print('deepsleep mode 5sec')
      machine.deepsleep(5000)
      print('deepsleep done')
      

      Hi,
      I'm trying to run this code. But the last print never appear.
      I'm running the latest fw.

      Cumps,

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jcaron @serafimsaudade
        last edited by

        @serafimsaudade That would be the expected result, as when the board wakes up after deep sleep, it acts as a reset and it restarts from the top of boot.py + main.py. During deep sleep RAM etc. are not powered, so the board can't just resume execution at the next instruction.

        1 Reply Last reply Reply Quote 2
        • S Offline
          serafimsaudade
          last edited by serafimsaudade

          I'm connected to the gpy over uart, and the reset never occur.
          :(

          update: today I will update the firmware, and give another try.

          1 Reply Last reply Reply Quote 0
          • S Offline
            serafimsaudade
            last edited by

            Hi guys,
            After done some test I realize that the GPY only exist from deepsleep if is power with 5V.

            If I power the GYP with 3.5V it hangs forever in deepsleep.

            This is normal?

            Cumps,

            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