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
""" | |
This is a multiline comment, you use it to | |
describe what the program does, or a more | |
involved piece of code. | |
You just type 3 quotation marks to start a | |
multiline comment "block" and then another 3 | |
quotation mark to end the block. | |
This code turns the red blinky LED (labeled D13) |
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 turn on all the neopixels in the CPX | |
""" | |
# -------------------------- | |
import time | |
from adafruit_circuitplayground import cp | |
# -------------------------- | |
# -------------------------- |
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
from adafruit_circuitplayground import cp | |
import time | |
cp.pixels.brightness = 1 | |
sleep_time = 0.001 | |
while True: | |
for c in range(0, 256): | |
cp.pixels.fill((c, 0, c)) |
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 | |
""" | |
# -------------------------- | |
from adafruit_circuitplayground import cp | |
# -------------------------- | |
# -------------------------- | |
while True: |
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 | |
# -------------------------- | |
# -------------------------- |
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 | |
# -------------------------- |
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: |
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
""" | |
make it so the pixels turn on and off in sequence | |
""" | |
# our imports | |
# ------------------------------------------- | |
from adafruit_circuitplayground import cp | |
import time | |
# ------------------------------------------- |
OlderNewer