from machine import Pin
from neopixel import NeoPixel
import time
# --- SETUP ---
# LED Strip configuratie
LED_PIN = 32 # De pin waar de Data-in van de strip aan hangt
NUM_LEDS = 8 # Aantal LEDs op de strip
np = NeoPixel(Pin(LED_PIN, Pin.OUT), NUM_LEDS)
# --- HULPFUNCTIES ---
def clear_leds():
"""Zet alle LEDs uit"""
for i in range(NUM_LEDS):
np[i] = (0, 0, 0)
np.write()
# --- OEFENINGEN ---
print("Oefening 1: Rood -> Groen -> Blauw (Max Intensiteit)")
# Intensiteit max = 255
# Rood
np[0] = (255, 0, 0)
np.write()
time.sleep(1)
# Groen
np[0] = (0, 255, 0)
np.write()
time.sleep(1)
# Blauw
np[0] = (0, 0, 255)
np.write()
time.sleep(1)
clear_leds()