Last active
May 9, 2022 18:43
-
-
Save lizzybrooks/12eea8c53a67be9b03881d5bc5c8b2f8 to your computer and use it in GitHub Desktop.
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
# Write your code here :-) | |
import time | |
import board | |
import neopixel | |
pixel_pin = board.D2 | |
num_pixels = 12 | |
pixels = neopixel.NeoPixel(pixel_pin, num_pixels, brightness=0.7, auto_write=False) | |
while True: | |
for num in range(0,254,2): | |
COLOR=(num,0,254-num) | |
for L in range(0, 12, 1): | |
pixels[L] = COLOR | |
pixels.show() | |
for num in range(0,254,2): | |
COLOR=(254-num,0,num) | |
for L in range(0, 12, 1): | |
pixels[L]=COLOR | |
pixels.show()# Write your code here :-) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment