# neopixel on off 22 Nov 2022 @squadshaaht
import time, random
import board
from rainbowio import colorwheel
import neopixel
print("Hello, Pi Pico!")
num_leds = 16
leds = neopixel.NeoPixel(board.GP28, num_leds, brightness=1.0, auto_write=True )
my_hue = 0
pos = 0 # where on ring we are
while True:
for i in range(num_leds):
for j in range(i):
leds[j] = 0xff0000
leds.show()
time.sleep(0.1)
leds.fill(0x000000)
leds.show()
time.sleep(0.1)
# leds[0:pos] = [colorwheel( my_hue )] * (pos)
# time.sleep(0.5)
# leds[:] = [0] * num_leds
# time.sleep(0.5)
# pos = (pos+1) % num_leds # move to next position