added led.py script

This commit is contained in:
2025-12-14 12:48:21 +01:00
parent cd3f9cfbe8
commit d915009894

17
rpi/timer/led.py Normal file
View File

@@ -0,0 +1,17 @@
import grovepi
import time
LED = 2 # Digital port D2
grovepi.pinMode(LED, "OUTPUT")
def on():
grovepi.digitalWrite(LED, 1)
def off():
grovepi.digitalWrite(LED, 0)
if __name__ == "__main__":
on()
time.sleep(1)
off()