pin.hold on gpy
-
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 domainWhich 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?!
-
@kjm Maybe the error message is just wrong. You have defined P18 as input, for which pin hold is not meaningful.
-
If I make 'P18' an output I get the same message Rob
-
@kjm Nevertheless P18 is a input only Pin (GPIO34).
-
@robert-hh
So if hold is appropriate for outputs only & P13-P18 are inputs only then hold is unusable with pins P13-P18? -
@kjm Obviously yes.
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