mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
11 lines
195 B
Python
11 lines
195 B
Python
from gpiozero import LED
|
|
from gpiozero.pins.pigpio import PiGPIOPin
|
|
from signal import pause
|
|
|
|
button = Button(2)
|
|
led = LED(PiGPIOPin(17, host='192.168.1.3'))
|
|
|
|
led.source = button.values
|
|
|
|
pause()
|