mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2026-01-30 05:07:21 +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)
|