Nerd stuff

LED Matrix Editor

One HTML file that talks to hardware.

A pixel editor for the Framework 16's 9×34 LED matrix modules. No framework, no build step, no server — a single HTML file that, in Chrome, speaks the module's serial protocol straight from the page.

Vanilla JS (one file)CSS gridWebSerialFramework inputmodule protocolPython fallback server

§One file, on purpose

The whole editor — grid, painting, shifting, invert, import/export — is a single self-contained HTML file of a few hundred lines. It lives in the ledmatrix repo as the source of truth and is copied to the website as a snapshot; the same file runs from disk, from a local server or from rm-worx.be. Drawings export as a Python list, because the panels' dashboard scripts are Python and copy-paste is an API too.

§The protocol, straight from the browser

In Chromium the send buttons use WebSerial: the page opens the module (USB 32ac:0020, 115200 baud) and writes the vendor protocol itself — magic bytes 0x32 0xAC, brightness command 0x00, and DrawBW 0x06 with a 39-byte bitmap where pixel (x,y) is bit x + 9·y. The byte packing was validated against the physical panel before shipping. HTTPS pages can't call local HTTP servers anymore, so direct USB isn't a gimmick — it's the only way the hosted tool can work at all.

§Which panel is which?

Two identical modules, identical USB IDs, no serial numbers — the browser literally cannot tell left from right. So the tool doesn't guess: an identify flow lights one panel fully, asks you which one glows, and assigns the other by elimination. Until then the buttons honestly say Panel 1 and Panel 2; afterwards they say Links and Rechts and send without a port chooser.

§Borrow, don't occupy

Every write opens the port, sends two commands and closes it again. Holding the port open would block everything else on the machine — the dashboard loop, hotkeys — from driving the panels. The permission survives; the connection doesn't need to.

§The flow

0x32 0xACDrawBW · 39 Bzonder WebSerialinputmodule-ctlEditor1 HTML-bestandWebSerialUSB 32ac · 115200Panel 9×34links / rechtspanel_server.pylokale fallback

← Back to rm-worx.be

This website uses minimal technical storage (cookies and local storage) to ensure proper functioning and simple visit statistics. By continuing to browse, you agree to this. See our Cookie Policy and Privacy Policy.