Created
September 22, 2021 06:16
-
-
Save BenjaminSantiago/f017d16d9fed9e7f0bf6b3c3b7923187 to your computer and use it in GitHub Desktop.
light up each neopixel in sequence
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
In this example we will light up each neopixel individually | |
""" | |
# -------------------------- | |
import time | |
from adafruit_circuitplayground import cp | |
# -------------------------- | |
# -------------------------- | |
while True: | |
cp.pixels[0] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[1] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[2] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[3] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[4] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[5] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[6] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[7] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[8] = (255, 255, 255) | |
time.sleep(0.5) | |
cp.pixels[9] = (255, 255, 255) | |
time.sleep(0.5) | |
# -------------------------- | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment