- espnow_link, ctrl_msg and beat_sync: the reliable link, envelopes and
beat-synced timing.
- ctrl_msg: accept an envelope with the trailing save byte.
- patterns_frame() and espnow_link_poll() split out of their tasks, so the
WebAssembly simulator can drive one frame and one link pass from a timer.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DDP frames still skip the device and master brightness, since the sender
sets the colours, but they are now scaled by max_brightness instead of
being shown at a fixed full 255.
ddp_test expects the same scale.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
- ap_ssid and ap_password on /api/network: empty name uses led-XXXXXX, a password of 8-63 characters
makes the access point WPA2, empty is open; the password is never sent back (ap_password_set)
- a running access point restarts when its name or password changes
- /api/status reports ap_on; the web page gets the fields
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- once pixels have arrived the strip keeps the last frame when they stop, until a pattern is selected
- a stamp stored as now|1 can be 1 ms ahead of a now read in the same millisecond; the unsigned
difference wrapped and looked like a timeout, so compare it as signed (within())
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- 19 new patterns for the 2 x 8 rig with the data-in heads in the middle (rig sweep, ripple, scanner,
checker...) and 9 2D ones (diagonal sweep and bounce, radar, spiral, diamonds, corners, plasma, bounce, rain)
- --interactive: pick patterns by number or name while streaming; --fps=N
- hard brightness cap in packet(): no byte over 25% (63) can leave the script
- async sending, one DDP packet per bar, one new frame per tick so the pattern and sender clocks don't beat
- the LSY1 sync goes out a tick after its frames and the streaming modes no longer wait for acks;
the full test still does
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
One request per line on USB-Serial-JTAG (@api {"id","method","path","body"}),
one @api envelope back; @reboot restarts. Requests run on the httpd task
through the same dispatcher as the WebSocket, so the checks match the web UI
and never race an HTTP handler. Replies go out in chunks under a lock that log
output shares, so a reply over the TX buffer size isn't dropped and log lines
can't land inside one. The primary console moves to USB-Serial-JTAG.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Driver acks each completed DDP frame; the test waits for the acks before broadcasting the sync.
- Sync listener on UDP 4049: a frame is held until the next sync, then shown.
- DDP pixels are shown at full brightness, ignoring the device brightness settings.
- "DDP and sync receive on" setting (NVS, network API, web UI); off ignores DDP and sync packets.
- ddp_test.py: finds devices on the subnet, drives them in lockstep at a fixed rate, runs animations.
- /api/ddp reports sync counters for diagnosis.
- Includes in-progress WebSocket, multi-driver web UI and Wi-Fi work from the same tree.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
- With no arguments, probe the local /24 for devices answering /api/ddp and test each one
(--subnet picks another subnet; named hosts still override discovery).
- Test all devices at the same time, one thread each.
- Add chase, rainbow and breathe animations; check the last frame of each is shown.
- Compare readback against the output scale (global x master x max brightness) the
firmware applies, read from /api/status and /api/hardware.
- Check the out-of-range packet and the timeout fallback against the last frame shown.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
- Device dropdown: All devices, this device by name, then drivers found by
mDNS (tagged app=led-strip) and any added by hand.
- POST /api/relay: a driver calls another driver's API for the page, so the
browser only talks to its own board. Limited to /api/*, /ota and /reboot.
- All devices sends brightness and preset plays to every device.
- Settings: sync this device's presets, order and startup to the others.
- CORS for LAN and localhost origins, and an OPTIONS handler for /ota.
- Header labels are removed; the controls keep aria-labels.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The cpp branch is the ESP-IDF firmware; the MicroPython drivers are removed.
Uncommitted MicroPython work was saved outside the repo before removal.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
- Wi-Fi access point led-XXXXXX plus a client network, configurable
mDNS name and static client address
- Preset tiles with an editor, drag to reorder, default presets,
global brightness, Run and Edit modes, collapsible menu on phones
- 35 patterns ported from led-driver, up to 512 LEDs, colour order,
max brightness and data pin settings
- Over-the-air updates (POST /ota) with rollback, and a CLI in tools/ota.py
- DDP receiver on UDP 4048 with tools/ddp_test.py
- LED refresh every 10 ms; lwIP sockets raised to 16 so mDNS, HTTP
and DDP can run together
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Brings the led_strip example into the cpp app, targeting the ESP32-C3:
- Access point led-XXXXXX (open) plus a Wi-Fi client configured from the
web Settings tab, with credentials stored in NVS and reconnect backoff
- mDNS as led.local with an HTTP service on port 80
- HTTP server with an embedded web UI and a JSON API for patterns and Wi-Fi
- Pattern runner for solid, rainbow, chase, breathe, blink, pulse,
transition and circle on a 119-LED WS2812 strip (GPIO 10)
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Adds a minimal ESP-IDF project for ESP32-S3 at the repo root: top-level
CMakeLists, a main component with a C++ app_main that logs a heartbeat,
sdkconfig.defaults selecting esp32s3, and build notes in the README.
Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Neither the global nor a preset's brightness goes above max_brightness; a
change redraws a static pattern under the new ceiling.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A run of three consecutive indices that all look old means the controller
rebooted and restarted its counter, so resync to it; one or two stray old
frames are still dropped as late copies.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
New espnow_ota module, loaded on the first OTA packet (types 0x07-0x0C,
status reply 0x26). Files are written by chunk index to <path>.new,
checked against their sha256, and moved into place together on commit,
followed by a reset. Unchanged files are skipped, and a repeated commit
after the reset still gets OK.
- receive ESP-NOW frames from esp.irq() so frames are not lost while
presets.tick() runs; polling remains as a fallback
- raise rxbuf to 2048 and the link inbox to 24 frames
- file_hashes: MicroPython's sha256 has no hexdigest()
- bench stats line includes esp.stats()
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the ESP32-C3 the radio tasks failed to start (Wifi Unknown Error 0x0101)
on about every other cold boot once the link and beat modules were loaded.
Bringing ESP-NOW up before the pattern library and the LED driver claim
memory made 6 of 6 cold boots start cleanly.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Adds the driver half of the v2 controller link as extra 0x4C message types:
DATA with fragment reassembly, de-duplication and acks, a state-version
digest with jittered resync requests, a bench echo, and a BEAT frame handled
by BeatSync (accepts one of the two copies, free-runs on the last period
when a beat is missed). Presets.beat() steps the selected pattern without a
message. Optional settings: espnow_loss, bench, beat_pin, usb_log.
The working tree also carries the files already running on the bench device,
which were ahead of origin/p2p: board.py (per-chip LED pin and CPU speed),
the reversed device_config flag in controller_messages.py, and the
apply_cpu_freq call in main.py.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Apply group membership on RX, accept select as [preset_id, step?],
and fix identify/off plus presets layout for manual beat stepping.
Co-authored-by: Cursor <cursoragent@cursor.com>
Use init_espnow for channel alignment; route wire CMD/GROUPS and JSON
v1 payloads to process_data from the poll loop.
Co-authored-by: Cursor <cursoragent@cursor.com>
Binary espnow_wire/espnow_transport modules plus a minimal main that
broadcasts a JSON hello and polls ESP-NOW while running presets.
Co-authored-by: Cursor <cursoragent@cursor.com>
Consolidate legacy pattern ids into meteor, particles, sparkle, chase,
and colour_cycle with n6/mode style selection; add pattern_modes helper,
self-contained tests/all.py, and preset mode alias on wire.
Co-authored-by: Cursor <cursoragent@cursor.com>
Align pattern background rendering to use preset.background_or(...) and update pulse/radiate single-step behaviour to preserve visible frames and step progression.
Replace sleep-based timing in pattern generators with non-blocking tick checks so long delays do not block the main loop and risk watchdog resets.
Co-authored-by: Cursor <cursoragent@cursor.com>
Wire controller messages through new modules (background tasks, runtime state,
startup) and add binary envelope handling.
Co-authored-by: Cursor <cursoragent@cursor.com>