Skip to content

Instantly share code, notes, and snippets.

@BenjaminSantiago
Created September 22, 2021 06:16
Show Gist options
  • Save BenjaminSantiago/f017d16d9fed9e7f0bf6b3c3b7923187 to your computer and use it in GitHub Desktop.
Save BenjaminSantiago/f017d16d9fed9e7f0bf6b3c3b7923187 to your computer and use it in GitHub Desktop.
light up each neopixel in sequence
"""
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