import time					# For time functions
import machine				# For hardware functions
from ws2812 import WS2812	# For RGB Led

# RGB colors values (R, G, B)
BLACK = (0, 0, 0)
RED = (255, 0, 0)
YELLOW = (255, 150, 0)
GREEN = (0, 255, 0)
CYAN = (0, 255, 255)
BLUE = (0, 0, 255)
PURPLE = (180, 0, 255)
WHITE = (255, 255, 255)

COLORS = (BLACK, RED, YELLOW, GREEN, CYAN, BLUE, PURPLE, WHITE)	# List of colors

led = WS2812(23,1)	# built in RGB led on XIAO RP2040 with the pin it is attached to (GPIO25) and the number of leds (1 led)

print("Multiple colors")	# Print on shell

while True:						# Infinite loop
    for color in COLORS:		# Goes through each color in the list COLORS
        led.pixels_fill(color)	# Changes the color for the led
        led.pixels_show()		# Sends the color data to the Led
        time.sleep(0.5)			# Delay