Commit Graph
88 Commits
Author SHA1 Message Date
jimmyandClaude Sonnet 5.5 995b05f538 test: ddp_test rig patterns, interactive mode and plain-DDP streaming
- 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>
2026-11-12 00:45:07 +13:00
jimmyandClaude Opus 5.5 762ec338bc feat: JSON API on the USB serial port for led-tool
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>
2026-11-11 22:34:36 +13:00
jimmyandClaude Haiku 5.5 4cd3bc7973 feat: DDP frame sync over UDP broadcast, DDP acks, DDP enable setting
- 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>
2026-11-11 14:10:55 +13:00
jimmyandClaude Haiku 5.5 47f4eba0d6 test: DDP test finds every device on the subnet and runs animations
- 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>
2026-11-11 12:57:14 +13:00
jimmyandClaude Haiku 5.5 d32f3d69cf feat: control several drivers from one web UI
- 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>
2026-11-11 02:48:48 +13:00
jimmyandClaude Haiku 5.5 4b623bb156 chore: remove MicroPython driver code (src, lib, tests, dev.py)
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>
2026-11-11 02:07:44 +13:00
jimmyandClaude Haiku 5.5 9a04d28ecf feat: web UI with AP, Wi-Fi client, mDNS, presets, OTA and DDP
- 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>
2026-11-11 01:54:32 +13:00
jimmyandClaude Haiku 5.5 89f996096c Add LED web UI with AP, Wi-Fi client, mDNS and patterns
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>
2026-11-11 00:02:49 +13:00
jimmyandClaude Haiku 5.5 df43820acd Add basic ESP-IDF app skeleton
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>
2026-11-10 23:23:08 +13:00
jimmyandClaude Sonnet 5.5 97df6e3cbe feat: max_brightness ceiling set from the controller's device config
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>
2026-11-10 01:48:42 +13:00
jimmyandClaude Sonnet 5.5 08d7277204 fix(beat): follow a controller that restarted its beat counter
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>
2026-11-10 01:48:42 +13:00
jimmyandClaude Opus 5.5 495da4e366 feat(espnow): app-file OTA over the reliable link
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>
2026-11-02 23:41:17 +13:00
jimmyandClaude Sonnet 5.5 940d1d0a77 fix(espnow): start ESP-NOW before the pattern library on boot
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>
2026-10-27 22:30:26 +13:00
jimmyandClaude Sonnet 5.5 20d1af7177 feat(espnow): reliable link and beat trigger on the 0x4C protocol
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>
2026-10-27 17:15:28 +13:00
jimmyandCursor 3286c4002d chore(settings): update default num_leds and color_order
Co-authored-by: Cursor <cursoragent@cursor.com>
beta-1.08
2026-05-29 16:00:56 +12:00
jimmyandCursor 68eb547ec4 feat(espnow): add debug logging and channel diagnostics
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-29 16:00:54 +12:00
jimmyandCursor 8403df531d feat(espnow): improve bridge transport and driver sync
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-28 00:38:09 +12:00
jimmyandCursor 088fe161a8 fix(main): blocking espnow rx loop and pass peer host
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 21:55:46 +12:00
jimmyandCursor c9895df512 fix(presets): phase-lock blink and one tick on re-select
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 21:55:46 +12:00
jimmyandCursor 39a84696c3 feat(espnow): ping request/response with jittered delay
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 21:55:39 +12:00
jimmyandCursor c7560b2e87 fix(settings): default wifi channel to 5
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 21:55:36 +12:00
jimmyandCursor ea21563900 fix(controller): apply select when presets not in message
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-25 21:55:30 +12:00
jimmyandCursor a97f6c7c2c feat(espnow): groups filter and v1 select list on driver
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>
2026-05-24 01:44:21 +12:00
jimmyandCursor 1fdb2c9441 fix(espnow): handle binary and JSON RX in simplified main
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>
2026-05-23 22:45:13 +12:00
jimmyandCursor 3e718f7432 feat(espnow): add wire transport and simplify broadcast main
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>
2026-05-23 22:44:39 +12:00
jimmyandCursor 85490a3bd0 feat(deploy): add file_hashes.json manifest on device
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 19:14:51 +12:00
jimmyandCursor 94266d5a7c feat(patterns): reverse animation direction via preset n8
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-17 18:32:01 +12:00
jimmyandCursor 55a97ac51c feat(patterns): merge pattern styles and add mode support
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>
2026-05-16 21:14:54 +12:00
jimmyandCursor 794f1a2841 feat(patterns): add northern wave, candle glow, starfall, ice sparkle
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-16 15:11:32 +12:00
jimmyandCursor 8f8bc894a9 feat(patterns): add icicles blizzard and rime winter effects
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-16 15:09:59 +12:00
jimmyandCursor 2a768376d0 chore(release): beta-1.03
Co-authored-by: Cursor <cursoragent@cursor.com>
beta-1.03
2026-05-10 16:13:59 +12:00
jimmyandCursor 170a0e05ab feat(patterns): align manual and auto behaviour
Unify manual/auto timing semantics for key patterns, add preset background support, and improve runtime observability while keeping the driver responsive under beat-triggered selects.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-09 20:07:58 +12:00
jimmy 4879fcfe90 fix(patterns): use preset background fallback across animations
Align pattern background rendering to use preset.background_or(...) and update pulse/radiate single-step behaviour to preserve visible frames and step progression.
2026-05-09 14:28:05 +12:00
jimmyandCursor fbebe9f4f9 fix(patterns): correct non-blocking timing and blink off phase
Co-authored-by: Cursor <cursoragent@cursor.com>
beta-1.01
2026-05-06 20:28:52 +12:00
jimmyandCursor a79c6f4dd3 fix(patterns): remove blocking sleeps from pattern loops
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>
2026-05-04 22:37:33 +12:00
piandCursor 2fcaf2f064 fix(driver): persist brightness when message includes save and b
Co-authored-by: Cursor <cursoragent@cursor.com>
xchc-1.0
2026-05-03 22:15:23 +12:00
piandCursor 3b38264b70 chore(wifi): log connecting while waiting for STA
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 21:27:29 +12:00
jimmyandCursor 3ee89ce3b4 feat(driver): add HTTP routes, startup split, and binary envelope support
Wire controller messages through new modules (background tasks, runtime state,
startup) and add binary envelope handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-03 14:54:12 +12:00
jimmy 74b4b495f9 feat(patterns): add expanded animation pack with smoke tests
Add a broad set of new pattern modules and matching pattern smoke scripts so the new effects can be validated directly on-device.
2026-04-23 20:10:01 +12:00
jimmy 4575ef16ad test(led-driver): add espnow peer and ap pm0 scripts
Made-with: Cursor
2026-04-21 21:48:42 +12:00
jimmy a342187635 feat(patterns): add twinkle pattern defaults
Made-with: Cursor
2026-04-21 21:48:42 +12:00
jimmy 428ed8b884 feat(led-driver): add preset clear command and runtime debug 2026-04-21 00:44:28 +12:00
jimmy a22702df4d feat(patterns): add radiate animation 2026-04-20 23:37:43 +12:00
jimmy 5a8866add7 feat(esp32): pattern upload route and ws controller ip
Made-with: Cursor
2026-04-19 23:27:33 +12:00
jimmy a2cd2f8dc2 test(led-driver): add pattern smoke harness
Made-with: Cursor
2026-04-19 23:27:29 +12:00
jimmy c47725e31a feat(patterns): add colour cycle, flicker, and flame
Made-with: Cursor
2026-04-19 23:27:19 +12:00
jimmy 22b1a8a6d6 fix(led-driver): phase-lock pattern timers
Made-with: Cursor
2026-04-19 21:41:18 +12:00
jimmy 45a38c05b7 fix(led-driver): persist default preset updates 2026-04-15 00:03:21 +12:00
jimmy 87bd0338bd fix(led-driver): stop loading patterns main and sync tick call 2026-04-14 23:13:16 +12:00
jimmy 0a33f399e1 refactor(led-driver): simplify websocket runtime and test layout 2026-04-14 22:12:31 +12:00