Created
September 22, 2021 06:20
-
-
Save BenjaminSantiago/b1ed5860a969cf9aae19982a1249a1bb to your computer and use it in GitHub Desktop.
Use a for loop to 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 | |
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