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

    Deep or LightSleep, how do i know if it's my FiPy or my PySense?

    Scheduled Pinned Locked Moved FiPy
    1 Posts 1 Posters 84 Views 1 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.
    • R Offline
      railmonitor
      last edited by railmonitor

      Hi everyone.

      First time poster :)

      Been looking around in the documentation pages and here on the forum for several hours now, but have not been able to find answers to the following questions, hope someone can help:

      I have a FiPy that i use with the Pysense board. I am a total newbie to Pycom products, so bear over with me. Now i want to know how sleep works, specifially deep or light sleep. What i can't seem to wrap my head around, is which of my pycom products is actually sleeping.

      If i add code: machine.sleep(5000)
      then i'm pretty sure now, that it is only the FiPy that sleeps (lightsleep) for 5 secs. However the LED, which i turned on just before sleeping still is on, why?

      Whereas if i add code: pysense.setup_sleep(5) + pysense.go_to_sleep()
      then it should only be my pysense who sleeps right? Or is it both? (only deepsleep available for the pysense as far as i know?)

      The only sleep i can seem to get working is the machine.sleep() method. However i am having problems waking up using the button on the pysense board. I have tried both of the following methods, but it appears it can't be done with the machine and only the pysense:

      machine.setup_int_pin_wake_up(False) - (according to documentation)

      or

      machine.pin_deepsleep_wakeup(pins = ('P14',), mode = machine.WAKEUP_ANY_HIGH, enable_pull = True)

      Really hope someone can elaborate on my questions, thanks in advance.!

      My test code:
      2da33687-9e3b-4ea8-a4ae-77137229d7d4-image.png

      EDIT: Another thing:

      Just tested with the pysense object instead, where i put the pysense to sleep, and then should be able to wake it up with the button on the pysense print. However i get following output, and it just loops like this:
      757b2f04-bc33-4558-9dd2-47fb5e57cfc9-image.png

      Do i need to somehow tell the pysense that it still must keep the connection from my USB to PC, in order to be able to use the FiPy while Pysense is sleeping?

      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