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