import time
from machine import Pin
from neopixel import NeoPixel
pin = Pin(4, Pin.OUT) # set GPIO0 to output to drive NeoPixels
np = NeoPixel(pin, 1) # create NeoPixel driver on GPIO0 for 1 pixels
while True:
for i in range(60, 255, 5):
np[0] = (255, i, 255)
np.write()
time.sleep(.1)
for i in range(255, 50, -5):
np[0] = (i, 255, 255)
np.write()
time.sleep(.1)
for i in range(50, 255, 5):
np[0] = (i, 255, i)
np.write()
time.sleep(.1)
for i in range(255, 100, -5):
np[0] = (i, 255, 255)
np.write()
time.sleep(.1)