You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test code was run originally with v1.6.2 on Bullseye and then later with v2.0 on Bookworm to the same effect.
importgpiozeroasgpfromtimeimportsleeppinB=gp.LED(19) #theoretically an unused, unset pinpinB.blink(n=2)
sleep(2) #voltages seen at expected levels during this timepinB.off() #not necessary after blink thread is donesleep(1) #pin is held at GroundpinB.close() #not required, but added for completeness#voltages rise to and persist at 0.9V - 1.9V
The text was updated successfully, but these errors were encountered:
classLGPIOPin(LocalPiPin):
...
defclose(self):
return# ++ HIPPY FIX ++ifself.factory._handleisnotNone:
# Closing is really just "resetting" the function of the pin;# we let the factory close deal with actually freeing stufflgpio.gpio_claim_input(
self.factory._handle, self._number, lgpio.SET_PULL_NONE)
def_get_function(self):
...
Operating system: Raspbian Bookworm
Python version: 3.11.2
Pi model: Pi 3 Model B
GPIO Zero version: 2.0
Pin factory used: lgpio
Pins that are at default state "input, pull-down" and called as "output" by the
LED
class are left floating after the pin is closed.Discussion has been had at the RPI forum, and there were two possible conclusions:
libgpiod
ownership is closed instead of releasedThe test code was run originally with v1.6.2 on Bullseye and then later with v2.0 on Bookworm to the same effect.
The text was updated successfully, but these errors were encountered: