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 with pysense shield + deep sleep issues

    Scheduled Pinned Locked Moved LoPy
    deep sleeplopypysense
    2 Posts 2 Posters 1.0k Views 2 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.
    • A Offline
      Andy12
      last edited by

      I encountered this issue "IndexError: bytes index out of range" when i tried to get the deep sleep aspect to work on lopy with a pysense shield. The error occurred after I tried to execute

      wake_s = ds.get_wake_status() as shown below.

      from deepsleep import DeepSleep

      ds = DeepSleep()

      wake_s = ds.get_wake_status()
      Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/flash/lib/deepsleep.py", line 144, in get_wake_status
      File "/flash/lib/deepsleep.py", line 77, in peek
      IndexError: bytes index out of range

      Below are the links which i used to get started with using the pysense and lopy.
      https://docs.pycom.io/chapter/gettingstarted/installation/firmwaretool.html
      https://github.com/pycom/pycom-libraries/blob/master/deepsleep/deepsleep.py
      https://github.com/pycom/pycom-libraries/blob/master/examples/deepsleep/main.py

      The information below shows the lopy os.uname() after the upgrade.

      import machine

      os.uname()
      (sysname='LoPy', nodename='LoPy', release='1.8.0.b1', version='v1.8.6-760-g90b72952 on 2017-09-01', machine='LoPy with ESP32', lorawan='1.0.0')

      Also the lopy is not going to deep sleep mode if i just use the following commands:

      from deepsleep import DeepSleep
      ds = DeepSleep()
      ds.go_to_sleep(60)

      Your help is much appreciated.

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jhoguaman @Andy12
        last edited by

        @andy12 said in Lopy with pysense shield + deep sleep issues:

        wake_s = ds.get_wake_status()

        Hi, I have the same problem, maybe Did you resolve it?

        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