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

    What happened to pin_deepsleep_wakeup()?

    Scheduled Pinned Locked Moved WiPy 2&3
    9 Posts 4 Posters 361 Views 4 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.
    • techykermitT Offline
      techykermit
      last edited by

      Hi! I am not quite sure what has happened with the machine.pin_deepsleep_wakeup() function.
      I have a bunch of PyComs lying around and I tested this with one of my devices and Adafruit's PIR sensor. Worked fantastically. But now, I get this when I try the same code out on my other devices upgraded to the latest version:

      AttributeError: 'module' object has no attribute 'pin_deepsleep_wakeup'
      

      Code:

      import machine
      machine.pin_deepsleep_wakeup(["P2"], mode=machine.WAKEUP_ANY_HIGH)  
      

      This makes me feel like it is like os.mkfs() - something has changed without updates to the documentation. Or maybe it is just me that has done something wrong...

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @techykermit
        last edited by robert-hh

        @techykermit Looks like it is called "pin_sleep_wakeup" now.

            { MP_OBJ_NEW_QSTR(MP_QSTR_remaining_sleep_time),    (mp_obj_t)(&machine_remaining_sleep_time_obj) },
            { MP_OBJ_NEW_QSTR(MP_QSTR_pin_sleep_wakeup),    (mp_obj_t)(&machine_pin_sleep_wakeup_obj) },
            { MP_OBJ_NEW_QSTR(MP_QSTR_reset_cause),             (mp_obj_t)(&machine_reset_cause_obj) },
        

        The code is changed but not the documentation.

        techykermitT K 2 Replies Last reply Reply Quote 0
        • techykermitT Offline
          techykermit @robert-hh
          last edited by

          @robert-hh Very interesting. You are correct, it works now. The documentation needs some updates - os.mkfs() is another example of a function that has been changed.

          1 Reply Last reply Reply Quote 0
          • K Offline
            kjm @robert-hh
            last edited by

            @robert-hh Speaking of missing/renamed functionality, has anybody managed to figure out why https://github.com/micropython/micropython-lib/pull/263/files won't work with urequests on pycom gpy?

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @kjm
              last edited by

              @kjm Even if Pycom would care about pull request from the community, they are not responsible for micropython-lib, which is in the domain of micropython.org. And that is some kind of grey area, since

              • the primary focus of that lib is the Linux port
              • urequests.py like most of the code was contributed by Paul Sokolovsky, which is not that active any more in the group. He still contributes to the lib, but with the focus of his own Micropython flavor, which slowly drifts away from the mainline.
              • the lib is not maintained as well as the main package. Which does not hurt. Being it Python source code, you can always incorporate the changes in your code. It is "just" for the sake of the community, if bug are fixed and improvements get public.
              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kjm @robert-hh
                last edited by kjm

                @robert-hh Ah pfalcon what a mixture of talent & hubris! OK, what about something closer to pycom. My latest gpy has 43818 sequans firmware & is much more stable on lte than all my other GPYs but pycom don't seem to be in any hurry to provide an upgdiff_41065-to-43818.dup upgrader. Do I really have to go out & buy all new GPYs or might there be a way to upgrade the old ones? Is there any way I could get the 43818 firmware out of the modem?

                robert-hhR 1 Reply Last reply Reply Quote 1
                • robert-hhR Offline
                  robert-hh @kjm
                  last edited by

                  @kjm Sorry, I have no clue of Pycom intentions and plans. The whole company seems to be silent, not activity at the forum. But as I understood Pycom's post about the latest Sequans modem improvement, it includes both software and hardware changes. This means, that even with an updated firmware the old devices will not get par with the new ones.

                  K 1 Reply Last reply Reply Quote 1
                  • K Offline
                    kjm @robert-hh
                    last edited by

                    @robert-hh I fear you are right. Not exactly a way to win hearts & minds.

                    1 Reply Last reply Reply Quote 1
                    • A Offline
                      AnkithB
                      last edited by AnkithB

                      Hi techykermit,

                      I'm sorry about the delay in the documentation update. I've now updated the machine.pin_deepsleep_wakeup() function - [https://docs.pycom.io/firmwareapi/pycom/machine/#machine-pin-deepsleep-wakeup-pins-mode-enable-pull] and I am currently working on updating the the os.mkfs() function in the documentation.

                      Keep us posted with how you get on,

                      Ankith B
                      Have you checked out our docs for the answer? (Now with an easy search function) https://docs.pycom.io   
                      Check out our newly revamped device management platform, Pybytes! https://pybytes.pycom.io/

                      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