Files
raspi-iot-ryhmatyo/testaukset.py
user@raspberrypi.local 4e38a079b3 testaus
2026-01-08 09:10:24 +00:00

13 lines
198 B
Python

import time
from grove.gpio import GPIO
led = GPIO(5, GPIO.OUT)
button = GPIO(6, GPIO.IN)
while True:
if button.read():
led.write(1)
else:
led.write(0)
time.sleep(0.1)