"""Test pattern: strip i has (i+1) LEDs on at the start (indices 0..i) plus the midpoint LED on. 50% red.""" BRIGHTNESS = 0.50 RED = (255, 0, 0) def _scale(color, factor): return tuple(int(c * factor) for c in color) class Test: def __init__(self, driver): self.driver = driver def run(self, preset): strips = self.driver.strips red = _scale(RED, BRIGHTNESS) for strip_idx, strip in enumerate(strips): n = strip.num_leds mid = self.driver.strip_midpoints[strip_idx] # from STRIP_CONFIG strip.fill((0, 0, 0)) # First (strip_idx + 1) LEDs on: indices 0..strip_idx for i in range(min(strip_idx + 1, n)): strip.set(i, red) # Midpoint LED on strip.set(mid, red) strip.show()