A complete LED matrix controller and animation system for the Raspberry Pi Pico using MicroPython and a web-based UI. This project allows you to send commands and animations to a 32x8 LED matrix display over serial using a modern, responsive web interface.
- Web UI built with Flask and HTML/JS
- Select serial device from dropdown (backend-driven)
- Multiple animated effects:
- Matrix Rain
- Fire simulation
- Plasma, Waves, Scanner
- Bouncing Balls
- Pong game
- Clock display (12/24h, blinking colon, with/without seconds)
- Scrolling text
- Brightness and speed controls
- Custom text support
- Tested on Raspberry Pi Pico
-
Inspired by the WOPR LED Enclosure project: https://www.printables.com/model/1167457-1u-rack-mount-wopr-leds-enclosure
-
Hardware driver via
max7219.py: https://github.com/mcauser/micropython-max7219 -
Guide for wiring and setup: MicrocontrollersLab - MAX7219 with Pi Pico
- Raspberry Pi Pico (with MicroPython installed)
- MAX7219 8x8 LED Matrix (4 modules recommended, e.g. 32x8)
- Jumper wires, breadboard
Raspberry Pi Pico pinout diagram (with MAX7219 wiring)
โโ LED (GP25)
โ โโโโโโ
โโโโโโโ โโโโโโโ
UART0 TX | I2C0 SDA | SPI0 RX | GP0 | 01โโ โ โโโโโโ โโ40 | VBUS <โโโ MAX7219 VCC
UART0 RX | I2C0 SCL | SPI0 CSn | GP1 | 02โโ โ โโ39 | VSYS
GND | 03โโ โ โ38 | GND <โโโ MAX7219 GND
I2C1 SDA | SPI0 SCK | GP2 | 04โโ โญโโฎ โโ37 | 3V3_EN
I2C1 SCL | SPI0 TX | GP3 | 05โโ โ โ โโ36 | 3V3(OUT)
UART1 TX | I2C0 SDA | SPI0 RX | GP4 | 06โโ โฐโโฏ โโ35 | | ADC_VREF
UART1 RX | I2C0 SCL | SPI0 CSn | GP5 | 07โโ โโ34 | GP28 | ADC2
GND | 08โโ โ โ33 | GND | AGND
I2C1 SDA | SPI0 SCK | GP6 | 09โโ โโโโโโโ โโ32 | GP27 | ADC1 | I2C1 SCL
I2C1 SCL | SPI0 TX | GP7 | 10โโ โ โ โโ31 | GP26 | ADC0 | I2C1 SDA
UART1 TX | I2C0 SDA | SPI1 RX | GP8 | 11โโ โ โ โโ30 | RUN
UART1 RX | I2C0 SCL | SPI1 CSn | GP9 | 12โโ โโโโโโโ โโ29 | GP22
GND | 13โโ โ โ28 | GND
I2C1 SDA | SPI1 SCK | GP10 | 14โโ โโ27 | GP21 | | I2C0 SCL
I2C1 SCL | SPI1 TX | GP11 | 15โโ โโ26 | GP20 | | I2C0 SDA
UART0 TX | I2C0 SDA | SPI1 RX | GP12 | 16โโ โโ25 | GP19 | SPI0 TX | I2C1 SCL
UART0 RX | I2C0 SCL | SPI1 CSn | GP13 | 17โโ โโ24 | GP18 | SPI0 SCK | I2C1 SDA
GND | 18โโ โ โ23 | GND
I2C1 SDA | SPI1 SCK | GP14 | 19โโ โโ22 | GP17 | SPI0 CSn | I2C0 SCL | UART0 RX
I2C1 SCL | SPI1 TX | GP15 | 20โโ โ โ โ โโ21 | GP16 | SPI0 RX | I2C0 SDA | UART0 TX
โโโโโโโโโโโโโโโโโโ
โ โ โ
โ โ โโ SWDIO
โ โโโโ GND
โโโโโโ SWCLK
MAX7219 โ Pico Wiring Summary:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
VCC โ VBUS (Pin 40)
GND โ GND (Pin 38 or 3 or 8 or 13 or 18 or 23 or 28 or 33)
DIN โ GP3 (Pin 5) โ SPI0 TX
CS โ GP5 (Pin 7) โ SPI0 CSn
CLK โ GP2 (Pin 4) โ SPI0 SCK
- Flash MicroPython firmware to the Raspberry Pi Pico
- Use Thonny to:
- Upload
main.pyandmax7219.pyto the Pico - Set
main.pyas the startup script
- Upload
- Open Thonnyโs serial terminal to view logs or test input commands
- Clone this repo on your desktop machine
- Install dependencies (Python 3.x)
pip install flask pyserial
- Run the web controller:
python clients/web/server.py
- Visit
http://localhost:5000in your browser - Select a serial port, click connect, and send effects!
For a production setup that starts automatically on boot:
- Clone this repo and navigate to the project directory
- Run the installation script as root:
sudo ./install.sh
- The service will be installed and started automatically
- Visit
http://localhost:5123orhttp://YOUR_IP:5123in your browser
Service Management:
# Check service status
sudo systemctl status picopixels-server
# Start/stop/restart service
sudo systemctl start picopixels-server
sudo systemctl stop picopixels-server
sudo systemctl restart picopixels-server
# View live logs
sudo journalctl -u picopixels-server -f
# Update the service (run from project directory)
sudo picopixels-updateFeatures of the service installation:
- Runs as dedicated
picopixelsuser with minimal privileges - Automatically starts on system boot
- Includes security hardening
- Easy update mechanism
- Proper logging via systemd journal
start <effect>โ Start looping animationstopโ Stop current animation<effect>โ Run effect once (e.g.test,border,on,off)brightness <0-15>โ Set brightnessspeed <ms>โ Set speed of animationtext <message>โ Set scrolling textclock [12/24] [seconds/noseconds] [blink/noblink]helpโ Show command list
The enclosure was designed using FreeCAD The Pi Pico holder was downloaded from Raspberry Pi Pico Case