mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
10 lines
148 B
Python
10 lines
148 B
Python
from gpiozero import LED, Button
|
|
from time import sleep
|
|
|
|
led = LED(17)
|
|
button = Button(2)
|
|
|
|
while True:
|
|
led.value = button.value
|
|
sleep(0.01)
|