Skip to content

feat(render): add an awtrix_mono build for MAX7219 LED module panels - #139

Open
drronnie85 wants to merge 3 commits into
Blueforcer:mainfrom
drronnie85:feat/max7219
Open

drronnie85 wants to merge 3 commits into
Blueforcer:mainfrom
drronnie85:feat/max7219

Conversation

@drronnie85

Copy link
Copy Markdown

What

A new build environment, awtrix_mono, for clocks built from chained MAX7219 8×8 LED modules instead of a WS2812 strip.

  • src/media/MatrixRenderer.cpp: under AWTRIX_DISPLAY_MAX7219, the renderer drives LEDMatrixDriver on the default SPI bus (SCK 18, MOSI 23) with CS on AWTRIX_MAX7219_CS_PIN (default 5), one module per 8 columns. The default build is unchanged: the FastLED path is the #else branch, byte for byte.
  • The canvas stays full colour. A pixel is lit when the average of its channels is above 32. Brightness sets the chips' intensity register (16 steps) instead of scaling colours, which would push dim pixels under the threshold; brightness 0 shuts the chips down, because intensity 0 is still lit.
  • mirror and rotate apply; the other panel settings describe strip wiring and are ignored. pinMatrix is unused.
  • platformio.ini: [env:awtrix_mono] extends awtrix. Not added to CI or releases.
  • License bookkeeping: THIRD-PARTY-NOTICES.md, LICENSES/MIT-LEDMatrixDriver.txt, notice exclusion in tools/system/components.json.
  • Docs: a awtrix_mono section in docs/developers/building.md, including the DFPlayer pin overlap (its defaults are GPIO 18/23 too).

Why

MAX7219 module chains are a common, cheap way to build a 32×8 clock. A personal AWTRIX 3 fork already drove one through a FastLED_NeoMatrix shim; this brings the same behaviour to NG without touching the portable core.

How it was verified

  • On hardware: classic ESP32 with four MAX7219 modules (32×8). Boot log shows matrix: MAX7219 x4, CS GPIO 5, and the clock runs the app loop and API normally.
  • pio run -e awtrix_mono and pio run -e awtrix build.
  • python tools/system/check_components.py and python tools/check_docs_sync.py pass.
  • Host tests and the docs site build were not run (no portable core change).
image

drronnie85 and others added 3 commits November 2, 2026 22:52
Clocks built from chained MAX7219 8x8 modules cannot run the WS2812 driver.
The new awtrix_mono environment swaps MatrixRenderer's output for LEDMatrixDriver
on the default SPI bus (CS on GPIO 5). The canvas stays full colour: a pixel is
lit above a fixed threshold, and brightness drives the chips' intensity register
instead of scaling colours, which would push dim pixels under the threshold.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
LEDMatrixDriver fixes SPI at 5 MHz and resends the whole frame every time.
On 5 V modules fed from the ESP32's 3.3 V pins that latched single rows wrong
now and then, seen as one row blinking on a static picture. A small driver in
the renderer runs the bus at AWTRIX_MAX7219_SPI_HZ (1 MHz), sends a row only
when it changed and rewrites every register and row once a second, so a module
that latched noise recovers on its own. Drops the LEDMatrixDriver dependency.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nged rows"

This reverts commit dedb0f1. The row flicker it targeted turned out to be on
the power side of the test board (it also showed on AWTRIX 3 and persisted at
1 MHz), so the LEDMatrixDriver version stays as tested.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant