led blink example in Python3
This commit is contained in:
1 parent
796dc7f59b
commit
18fe7a6d81
1 file changed
+16
Executable
+16
@@ -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)
|
||||||
Reference in new issue
Block a user