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,11 +1,14 @@
|
||||
from gpiozero import LED
|
||||
from gpiozero.pins.pigpio import PiGPIOPin
|
||||
from gpiozero.pins.pigpio import PiGPIOFactory
|
||||
from gpiozero.tools import all_values
|
||||
from signal import pause
|
||||
|
||||
factory3 = PiGPIOFactory(host='192.168.1.3')
|
||||
factory4 = PiGPIOFactory(host='192.168.1.3')
|
||||
|
||||
led = LED(17)
|
||||
button_1 = Button(PiGPIOPin(17, host='192.168.1.3'))
|
||||
button_2 = Button(PiGPIOPin(17, host='192.168.1.4'))
|
||||
button_1 = Button(17, pin_factory=factory3)
|
||||
button_2 = Button(17, pin_factory=factory4)
|
||||
|
||||
led.source = all_values(button_1.values, button_2.values)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user