Skip to main content
deleted 1 character in body
Source Link

Not really supported in gpiozero.

There is an "ongoing" discussion over hererhere: https://github.com/gpiozero/gpiozero/issues/707

There is a hack mentioned by CAM-Gerlach, that seems to work:

import gpiozero.pins.rpigpio

def close(self): pass
gpiozero.pins.rpigpio.RPiGPIOPin.close = close

gpiozero.LED(..., pin_factory=gpiozero.pins.rpigpio.RPiGPIOFactory())

We basically overwrite the close function of the PinFactory and use that one for creating the LED.

Not really supported in gpiozero.

There is an "ongoing" discussion over herer: https://github.com/gpiozero/gpiozero/issues/707

There is a hack mentioned by CAM-Gerlach, that seems to work:

import gpiozero.pins.rpigpio

def close(self): pass
gpiozero.pins.rpigpio.RPiGPIOPin.close = close

gpiozero.LED(..., pin_factory=gpiozero.pins.rpigpio.RPiGPIOFactory())

We basically overwrite the close function of the PinFactory and use that one for creating the LED.

Not really supported in gpiozero.

There is an "ongoing" discussion over here: https://github.com/gpiozero/gpiozero/issues/707

There is a hack mentioned by CAM-Gerlach, that seems to work:

import gpiozero.pins.rpigpio

def close(self): pass
gpiozero.pins.rpigpio.RPiGPIOPin.close = close

gpiozero.LED(..., pin_factory=gpiozero.pins.rpigpio.RPiGPIOFactory())

We basically overwrite the close function of the PinFactory and use that one for creating the LED.

Source Link

Not really supported in gpiozero.

There is an "ongoing" discussion over herer: https://github.com/gpiozero/gpiozero/issues/707

There is a hack mentioned by CAM-Gerlach, that seems to work:

import gpiozero.pins.rpigpio

def close(self): pass
gpiozero.pins.rpigpio.RPiGPIOPin.close = close

gpiozero.LED(..., pin_factory=gpiozero.pins.rpigpio.RPiGPIOFactory())

We basically overwrite the close function of the PinFactory and use that one for creating the LED.