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

    pin.hold on gpy

    Scheduled Pinned Locked Moved GPy
    gpypin.hold
    6 Posts 2 Posters 427 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.
    • K Offline
      kjm
      last edited by kjm

      If I run

      d='P22'; c='P21'; b='P20'; a='P19'; decode='P23'   
      A=Pin(a, Pin.OUT); B=Pin(b, Pin.OUT); C=Pin(c, Pin.OUT); D=Pin(d, Pin.OUT); E=Pin(decode, Pin.IN) 
      for i in (A, B, C, D, E): i.hold(0)
      

      everything is sweet, but if I change it to

      d='P22'; c='P21'; b='P20'; a='P19'; decode='P18'   
      A=Pin(a, Pin.OUT); B=Pin(b, Pin.OUT); C=Pin(c, Pin.OUT); D=Pin(d, Pin.OUT); E=Pin(decode, Pin.IN)
      for i in (A, B, C, D, E): i.hold(0)
      

      I get

      OSError: the hold functionality is only available for GPIO pins in the RTC domain
      

      Which leads me to thing the gpy thinks 'P18' is not in the rtc domain. However according to https://docs.pycom.io/firmwareapi/pycom/machine/pin.html it is?!

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

        @kjm Maybe the error message is just wrong. You have defined P18 as input, for which pin hold is not meaningful.

        1 Reply Last reply Reply Quote 0
        • K Offline
          kjm
          last edited by

          If I make 'P18' an output I get the same message Rob

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

            @kjm Nevertheless P18 is a input only Pin (GPIO34).

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

              @robert-hh
              So if hold is appropriate for outputs only & P13-P18 are inputs only then hold is unusable with pins P13-P18?

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

                @kjm Obviously yes.

                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