import board, neopixel, time
from adafruit_led_animation.color import RED, YELLOW, ORANGE, GREEN, TEAL, CYAN, BLUE, PURPLE, MAGENTA, GOLD, PINK, AQUA, JADE, AMBER, OLD_LACE, WHITE, BLACK

strip_1 = neopixel.NeoPixel(board.A1, 30, brightness=0.1)
strip_2 = neopixel.NeoPixel(board.A2, 30, brightness=0.1)

max_brightness = 0.1
fade_steps = 20
fade_delay = 0.025

colors = [RED, YELLOW, ORANGE, GREEN, TEAL, CYAN, BLUE, PURPLE, MAGENTA, GOLD, PINK, AQUA, JADE, AMBER, OLD_LACE, WHITE]

while True:
    for color in colors:
        strip_1.fill(color)
        strip_2.fill(color)
        
        # Fade in
        for step in range(fade_steps + 1):
            brightness = (step / fade_steps) * max_brightness
            strip_1.brightness = brightness
            strip_2.brightness = brightness
            time.sleep(fade_delay)
        
        # Fade out
        for step in range(fade_steps, -1, -1):
            brightness = (step / fade_steps) * max_brightness
            strip_1.brightness = brightness
            strip_2.brightness = brightness
            time.sleep(fade_delay)
