Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Python • Re: Failed To Add Edge Detection, GPIOZERO

$
0
0
What happens if you run this script, which sets the "pin factory"

Code:

from gpiozero import LightSensor, Devicefrom gpiozero.pins.rpigpio import RPiGPIOFactoryDevice.pin_factory = RPiGPIOFactory()ldr = LightSensor(4)print ("factory=",Device.pin_factory)print (ldr.value)

Statistics: Posted by neilgl — Wed Jul 30, 2025 10:05 am



Viewing all articles
Browse latest Browse all 8041

Trending Articles