Skip to content

Instantly share code, notes, and snippets.

@BenjaminSantiago
Created September 22, 2021 06:20
Show Gist options
  • Save BenjaminSantiago/b1ed5860a969cf9aae19982a1249a1bb to your computer and use it in GitHub Desktop.
Save BenjaminSantiago/b1ed5860a969cf9aae19982a1249a1bb to your computer and use it in GitHub Desktop.
Use a for loop to light up each neopixel in sequence
"""
In this example we will light up each neopixel individually
except this time...use a for loop
"""
# --------------------------
import time
from adafruit_circuitplayground import cp
# --------------------------
# --------------------------
while True:
for p in range(0, 10):
cp.pixels[p] = (255, 255, 255)
time.sleep(0.2)
# --------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment