mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
11 lines
167 B
Python
11 lines
167 B
Python
from gpiozero import Button, LED
|
|
from gpiozero.tools import negated
|
|
from signal import pause
|
|
|
|
led = LED(4)
|
|
btn = Button(17)
|
|
|
|
led.source = negated(btn.values)
|
|
|
|
pause()
|