from neopixel import NeoPixel
from machine import Pin
NUM_LEDS = 25
LED_PIN = 2
np = NeoPixel(Pin(LED_PIN), NUM_LEDS)
# Create a dictionary to store LED states
led_state = {
'21': 1, '22': 1, '23': 1, '24': 1, '25': 1
}
# Display based on dictionary values
for key in led_state:
if led_state[key] == 1:
np[int(key) - 1] = [0, 255, 255] #aqua
else:
np[int(key) - 1] = [0, 0, 0] # Off
np.write()