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
This commit is contained in:
20
workspace/code/pattern_rainbow_demo.py
Normal file
20
workspace/code/pattern_rainbow_demo.py
Normal file
@@ -0,0 +1,20 @@
|
||||
"""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()
|
||||
Reference in New Issue
Block a user