Files
python-editor/workspace/code/pattern_rainbow_demo.py
jimmy e4c811f51d Expand browser editor runtime and LED simulation workflows.
Add Docker deployment support, richer Selenium/LED pattern tests, in-browser diagnostics, responsive UI improvements, and 16x16 panel simulation tooling to speed iteration and hardware-style prototyping.

Made-with: Cursor
2026-05-01 20:24:05 +12:00

21 lines
403 B
Python

"""Rainbow pattern demo using led_patterns helpers."""
from machine import Pin
import neopixel
import time
from led_patterns import rainbow_frame
np = neopixel.NeoPixel(Pin(4), 256)
for frame in range(120):
frame_colors = rainbow_frame(len(np), frame, step=5)
for i, color in enumerate(frame_colors):
np[i] = color
np.write()
time.sleep(0.05)
np.fill((0, 0, 0))
np.write()