import machine
import neopixel
from time import sleep
# initialize led strip on pin number 4
pin4 = machine.Pin(4)
# determine the number of pixels
number_of_pixels = 15
# here we initializing the LED strip. It acts like a python list of color tupples.
ledstrip = neopixel.NeoPixel(pin4, number_of_pixels)
# Colors variable list. Every color is an (Red, Green, Blue) tupple.
YELLOW = (200, 200, 0)
PURPLE = (95, 68, 150)
ORANGE = (128, 64, 0)
GREEN = (0, 200, 0)
RED = (200, 0, 0)
BLUE = (0, 0, 200)
WHITE = (200, 200, 200)
OFF = (0, 0, 0)
PINK = (199, 76, 176)
CYAN = (76, 180, 199)
# Turn on one led on first position:
# Setting the memory
ledstrip[0] = RED
# Write to led strip
ledstrip.write()