Yes, I know this is a silly question but the Plasma2040 board example code mostly uses hue to define colors. I’ve been looking around in the GitHub repo and the tutorials but I can’t find a reference for how to use hue values.
Can anyone point me to a reference guide or something?
OK, I think I get it now. So here’s an example that shows the use of HSV, just assuming 1 for saturation and brightness.
while True:
for i in range(NUM_LEDS):
# the if statements below use a modulo operation to identify the even and odd numbered LEDs
if (i % 2) == 0:
led_strip.set_hsv(i, HUE_1 / 360, 1.0, BRIGHTNESS)
else:
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
time.sleep(SPEED)
for i in range(NUM_LEDS):
if (i % 2) == 0:
led_strip.set_hsv(i, HUE_2 / 360, 1.0, BRIGHTNESS)
else:
led_strip.set_hsv(i, HUE_1 / 360, 1.0, BRIGHTNESS)
time.sleep(SPEED)