import time
from neopixel import NeoPixel
from machine import Pin
N_Leds = 2
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:
pix[0], pix[1] = pix[1], pix[0]
pix.write()
time.sleep(0.5) # Wait for USB to become ready