Created
September 22, 2021 06:34
-
-
Save BenjaminSantiago/e63203f78992078bcb8a75eac078508f to your computer and use it in GitHub Desktop.
use the sliding switch on the CPX
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
""" | |
use the switch to turn on the neopixels | |
""" | |
# -------------------------- | |
from adafruit_circuitplayground import cp | |
# -------------------------- | |
# -------------------------- | |
while True: | |
if cp.switch: | |
cp.pixels.fill((255,255,255)) | |
else: | |
cp.pixels.fill((0, 0, 0)) | |
# -------------------------- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment