led blink example in Python3

This commit is contained in:
br committed 2023-05-13 10:56:29 +02:00
1 parent 796dc7f59b
commit 18fe7a6d81
1 file changed
+16
Executable
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
import RPi.GPIO as GPIO
from time import sleep
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.OUT)
while True:
GPIO.output(17, True)
print ("lampe an")
sleep(1)
GPIO.output(17, False)
print ("lampe aus")
sleep(1)