Skip to main content

Framework LED Matrix Python Tool

Framework LED Matrix Python Tool is a Python command-line suite for the Framework Laptop 16 LED Matrix modules, developed by community member mariobx (with contributions from mariom6). It was created for programming novices to run "cool simulations" and visual experiments on the dual 9×34 LED matrix beyond the simple boot animations, after the author was surprised by the lack of available tooling at the time of purchase1. The project is licensed under GPL-3.01.

The core/ directory defines a simplified API for interacting with the LED functions — the path of the modules, sending both greyscale and regular payloads, and clearing the matrices — which the higher-level simulation and text commands build on1.

Capabilities

The suite runs a variety of visual experiments1:

CategoryDescription
Anagrams & TextAnagrams of random words gliding across the screen; custom text rendered vertically and horizontally
Cellular AutomataConway's Game of Life, Biham-Middleton-Levine (BML) traffic model, Hardy-Pomeau-Pazzis (HPP) lattice gas collisions
Mathematical VisualizationsPlot functions like sin, cos, exp, tanh directly onto the matrix
Hybrid SimulationsSeed Game of Life or HPP simulations using math graphs or anagrammed text as the initial state
Noise & Hardware EffectsHardware-level greyscale noise and control of internal hardware animations

Command Reference

background (aliases: bg)

Run the background runner (screensaver mode)1.

led

SubcommandDescription
versionGet firmware version from modules
clearClear both displays (all LEDs off)
fill [--hold <s>]Fill the display, holding for N seconds
start-animStart hardware animation (e.g. fades)
stop-animStop hardware animation
resetClear display and stop animation
portsShow available serial ports (debugging)

text

SubcommandDescription
vertical <text>Render text vertically (options: --font-size, --which left|right|both, --row-offset, --hold)
horizontal <text>Render text horizontally (options: --font-size, --which, --x-offset, --y-offset, --hold)

anagram

SubcommandDescription
draw <word>Find and draw anagrams for a word (--which, --no-animate)

sim

SubcommandDescription
bmlBiham-Middleton-Levine traffic model (--density, --steps, --delay)
bml-localBML traffic model in a local Matplotlib window
hppHardy-Pomeau-Pazzis lattice gas (--density, --steps, --delay, --which)
hpp-mathHPP simulation seeded with math function graphs
outerGeneric Outer-Totalistic CA using Birth/Survival rules (--b-rule, --s-rule)
gofConway's Game of Life (B3/S23) — --board random|glider|acorn
innerInner-Totalistic CA, Wolfram NKS style (rule number argument)
random-greyHardware-level greyscale noise (--duration, --no-animate)
anagram-gofGame of Life seeded with anagrammed text
anagram-drawSequentially find and draw anagrams for random words
math-gofGame of Life seeded with math graphs
math-graphsCycling sequence of random math graphs

math

SubcommandDescription
plot <function>Plot a function locally and on the matrix (sin, cos, tan, exp, log, tanh, etc.)

A global -v, --verbose flag enables detailed logging for all commands, and frameworkled --test runs a built-in test suite cycling through various commands to verify hardware and software functionality1.

Technical Details

DetailValue
LanguagePython1
LicenseGPL-3.01
HardwareFramework 16 LED Matrix modules (RP2040 + IS31FL3741A)
OutputGrayscale PWM and black-and-white bitmaps
DependenciesMatplotlib (local simulations)
Contributors2 (mariobx, mariom6)1
Commits26+1
Stars11
CreatedJanuary 24, 20261
ProjectDescription
fw16-led-matrixdCross-platform Rust daemon with image rendering and pair mode
led-matrix-managerQt GUI for LED matrix management
fw16-pongwarsPong Wars game for the FW16 LED Matrix
LED Matrix VocabJapanese vocabulary study tool for the LED Matrix
dark-matrixFull daemon + web UI with games and life simulations

Footnotes

  1. mariobx/Framework-LED-Matrix — GitHub (README, command reference, core API) 2 3 4 5 6 7 8 9 10 11 12