import time
from neopixel import NeoPixel
from machine import Pin
N_Leds = 16
NEO_PIN = Pin(14, Pin.OUT)
pix = NeoPixel(NEO_PIN, N_Leds)
print( f"There are {pix.n} pixels")
RED = (255, 0, 0)
GREEN = (0, 255, 0)
BLUE = (0, 0, 255)
time.sleep(0.1) # Wait for USB to become ready
pix[0] = RED
pix[1] = GREEN
pix.write()
while True:
tmp = pix[0]
for n in range(N_Leds):
pix[n] = (n * 10 + 40, 0, 0)
#pix[N_Leds - 1] = tmp
pix.write()
time.sleep(0.5) # Wait for USB to become ready