Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Commit

Permalink
Add simple led chaser example.
Browse files Browse the repository at this point in the history
Change-Id: I18a5dc49d115d9f222ea2445a086fc9994adce06
  • Loading branch information
dmitriykovalev committed Jul 8, 2018
1 parent 52d97d3 commit 981e8bb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/examples/gpiozero/led_chaser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env python3
"""Demonstrates on board LED support with correct polarity.
Implements simple LED chaser.
"""

from time import sleep
from gpiozero import LED
from aiy.pins import (PIN_A, PIN_B, PIN_C, PIN_D)

leds = (LED(PIN_A), LED(PIN_B), LED(PIN_C), LED(PIN_D))
while True:
for led in leds:
led.on()
sleep(0.5)
led.off()

0 comments on commit 981e8bb

Please sign in to comment.