mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Correct remote GPIO recipes
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
from gpiozero import LED
|
||||
from gpiozero.pins.pigpio import PiGPIOPin
|
||||
from gpiozero.pins.pigpio import PiGPIOFactory
|
||||
from signal import pause
|
||||
|
||||
factory = PiGPIOFactory(host='192.168.1.3')
|
||||
|
||||
button = Button(2)
|
||||
led = LED(PiGPIOPin(17, host='192.168.1.3'))
|
||||
led = LED(17, pin_factory=factory)
|
||||
|
||||
led.source = button.values
|
||||
|
||||
|
||||
Reference in New Issue
Block a user