Skip to content

Instantly share code, notes, and snippets.

@lizzybrooks
Last active May 9, 2022 18:43
Show Gist options
  • Save lizzybrooks/12eea8c53a67be9b03881d5bc5c8b2f8 to your computer and use it in GitHub Desktop.
Save lizzybrooks/12eea8c53a67be9b03881d5bc5c8b2f8 to your computer and use it in GitHub Desktop.
# 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