feat: add MAX7219 LED matrix display support (4-panel and 8-panel)#240
Merged
PierreGode merged 11 commits intoPierreGode:mainfrom Mar 18, 2026
Merged
feat: add MAX7219 LED matrix display support (4-panel and 8-panel)#240PierreGode merged 11 commits intoPierreGode:mainfrom
PierreGode merged 11 commits intoPierreGode:mainfrom
Conversation
Adds SPI-driven MAX7219 cascaded LED matrix support for Ragnar: - resources/waveshare_epd/max7219.py: luma.led_matrix-based driver - display.py: _run_max7219() scrolling status renderer - shared.py: max7219_spi_port, max7219_spi_device config keys + display profiles - epd_helper.py: registers max7219_4panel and max7219_8panel types - install_ragnar.sh: MAX7219 added as options 11/12 in setup wizard - ragnar_modern.js: configMetadata entries for MAX7219 settings - requirements.txt: luma.led_matrix + luma.core dependencies - README.md: MAX7219 added to fork features table Wiring: VCC→5V, GND→GND, DIN→GPIO10(MOSI), CS→GPIO8(CE0), CLK→GPIO11(SCLK) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
MAX7219 is SPI-driven and managed entirely by display.py.
Previously, SharedData.initialize_epd_display() would try
EPDHelper('max7219_8panel'), fail, trigger auto-detect, find
the physical e-paper, and overwrite epd_type in the config.
Add early-return before the EPDHelper block for max7219_4panel
and max7219_8panel, mirroring the existing pager-mode skip.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When epd_type is max7219_4panel/max7219_8panel, shared_data.epd_helper is None (by design — MAX7219 is managed entirely by _run_max7219). The unconditional init_partial_update() call in __init__ raised AttributeError on None, crashing the display thread before run(). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- wipe_epd.py: skip MAX7219/SSD1306/GC9A01 — not e-paper, no wipe needed - install_ragnar.sh: use sudo pip3 so luma.led_matrix is available system-wide (Ragnar service runs as root, user-local installs are not visible to it) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- block_orientation default changed from -90 to 0 (correct for horizontal panel arrays; -90 is for portrait-mounted modules) - Add explicit device.clear() after init — MAX7219 powers on with all LEDs lit, this forces a blank canvas immediately - Add max7219_block_orientation config key (default 0) so users can tune rotation from the Settings UI without code changes Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…strips Standard cascaded horizontal LED matrix modules require block_orientation=-90 with luma.led_matrix. The previous default of 0 caused text to appear rotated 90 degrees and only ~2 characters to be visible (pixel mapping collapsed the effective width to 8px instead of 64px). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix block_orientation default to -90 for horizontal LED matrix strips - Fix .get() fallback in _run_max7219 to use -90 instead of 0 - Replace generic T:/C: counter with detailed labelled messages: TARGETS FOUND, CREDENTIALS STOLEN, VULNERABILITIES, WIFI, IP, STATUS - All messages are uppercase for better LED matrix readability Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Switch Arial.ttf → DejaVuSansMono.ttf for even monospace character spacing and proper word gaps (Arial proportional spacing caused uneven kerning and words running together at 8px) - Bump font size 8 → 9 to use 7 of 8 pixel rows - Draw at y=-bbox_top instead of y=0 to shift glyphs up and use all 8 LED rows Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add MAX7219 options to the web UI config page: - Display type dropdown: MAX7219 8-panel (64x8) and 4-panel (32x8) - Display config section: max7219_spi_port, max7219_spi_device, max7219_block_orientation, display_brightness - Custom input rows with IDs for show/hide (same pattern as ssd1306) - syncDisplayRows() shows MAX7219 settings only when a MAX7219 type is selected; brightness row visible for MAX7219/SSD1306/GC9A01 Install script already had MAX7219 options (options 11/12). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds support for cascaded MAX7219 8×8 LED matrix panel arrays as a new display option for Ragnar on Raspberry Pi.
Hardware Support
Features
Install Script
Options added to \install_ragnar.sh:
Web UI Config
New settings exposed in the Display section of the web config page when a MAX7219 type is selected:
Files Changed
esources/waveshare_epd/max7219.py\ — MAX7219 SPI driver using luma.core
Compatibility Notes
This PR and the open LCD1602 PR (#239) both touch shared infrastructure:
If both PRs are merged, apply LCD1602 (#239) first, then this PR — or merge them together to avoid conflicts.