add blue led toggle script and new dependencies
This commit is contained in:
17
src/scripts/blink_led.py
Executable file
17
src/scripts/blink_led.py
Executable file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
import time
|
||||||
|
import RPi.GPIO as GPIO
|
||||||
|
|
||||||
|
GPIO_PIN = 12
|
||||||
|
|
||||||
|
GPIO.setmode(GPIO.BCM)
|
||||||
|
GPIO.setup(GPIO_PIN, GPIO.OUT)
|
||||||
|
|
||||||
|
while True:
|
||||||
|
print("toggle led ON")
|
||||||
|
GPIO.output(GPIO_PIN, GPIO.HIGH)
|
||||||
|
time.sleep(1)
|
||||||
|
print("toggle led ON")
|
||||||
|
GPIO.output(GPIO_PIN, GPIO.LOW)
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
Reference in New Issue
Block a user