Skip to content

Commit 65db366

Browse files
committed
Blinks red and gree LEDs
1 parent 2fc458c commit 65db366

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

source/examples/python/leds.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/usr/bin/env python3
2+
# Blinks some gpio pins on the Blue
3+
import Adafruit_BBIO.GPIO as GPIO
4+
import time
5+
6+
LEDs = ["RED_LED", "GREEN_LED"]
7+
8+
for LED in LEDs:
9+
GPIO.setup(LED, GPIO.OUT)
10+
11+
while True:
12+
for LED in LEDs:
13+
GPIO.output(LED, GPIO.HIGH)
14+
time.sleep(0.1)
15+
GPIO.output(LED, GPIO.LOW)
16+
time.sleep(0.1)

0 commit comments

Comments
 (0)