{"id":29462059,"url":"https://github.com/seanonet/picopixels","last_synced_at":"2025-09-02T02:33:55.360Z","repository":{"id":304449488,"uuid":"1014867079","full_name":"SeanoNET/PicoPixels","owner":"SeanoNET","description":"LED matrix controller and animation system for the Raspberry Pi Pico","archived":false,"fork":false,"pushed_at":"2025-07-13T06:24:29.000Z","size":4522,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-13T08:24:26.397Z","etag":null,"topics":["embedded","led","led-controller","led-matrix-displays","micropython","python","raspberry-pi-pico"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SeanoNET.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-06T15:07:08.000Z","updated_at":"2025-07-13T06:24:32.000Z","dependencies_parsed_at":"2025-07-13T08:24:31.926Z","dependency_job_id":"ba1b7da4-7f8a-464c-9ec5-0cf8bce1e7d5","html_url":"https://github.com/SeanoNET/PicoPixels","commit_stats":null,"previous_names":["seanonet/picopixels"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/SeanoNET/PicoPixels","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanoNET%2FPicoPixels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanoNET%2FPicoPixels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanoNET%2FPicoPixels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanoNET%2FPicoPixels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SeanoNET","download_url":"https://codeload.github.com/SeanoNET/PicoPixels/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SeanoNET%2FPicoPixels/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273220371,"owners_count":25066373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["embedded","led","led-controller","led-matrix-displays","micropython","python","raspberry-pi-pico"],"created_at":"2025-07-14T04:00:46.618Z","updated_at":"2025-09-02T02:33:55.333Z","avatar_url":"https://github.com/SeanoNET.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LED Matrix Control Suite\n\nA 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.\n\n---\n\n## 🔧 Features\n- Web UI built with Flask and HTML/JS\n- Select serial device from dropdown (backend-driven)\n- Multiple animated effects:\n  - Matrix Rain\n  - Fire simulation\n  - Plasma, Waves, Scanner\n  - Bouncing Balls\n  - Pong game\n  - Clock display (12/24h, blinking colon, with/without seconds)\n  - Scrolling text\n- Brightness and speed controls\n- Custom text support\n- Tested on Raspberry Pi Pico\n\n---\n\n## 🧠 Inspiration \u0026 Credit\n- Inspired by the **WOPR LED Enclosure** project:\n  [https://www.printables.com/model/1167457-1u-rack-mount-wopr-leds-enclosure](https://www.printables.com/model/1167457-1u-rack-mount-wopr-leds-enclosure)\n\n- Hardware driver via `max7219.py`:\n  [https://github.com/mcauser/micropython-max7219](https://github.com/mcauser/micropython-max7219)\n- Guide for wiring and setup:\n  [MicrocontrollersLab - MAX7219 with Pi Pico](https://microcontrollerslab.com/max7219-led-dot-matrix-display-raspberry-pi-pico)\n- [Claude](https://claude.ai/)\n---\n\n## 📦 Hardware Requirements\n- Raspberry Pi Pico (with MicroPython installed)\n- MAX7219 8x8 LED Matrix (4 modules recommended, e.g. 32x8)\n- Jumper wires, breadboard\n\n### Wiring Example (SPI0)\n```\nRaspberry Pi Pico pinout diagram (with MAX7219 wiring)\n\n                                              ┌╌ LED (GP25)\n                                              ┆ ┏━━━━┓\n                                          ┌─────┃    ┃─────┐\nUART0 TX | I2C0 SDA | SPI0 RX  | GP0  | 01│●  ┆ ┗━━━━┛    ●│40 | VBUS     \u003c─── MAX7219 VCC\nUART0 RX | I2C0 SCL | SPI0 CSn | GP1  | 02│●  ⏄           ●│39 | VSYS\n                                 GND  | 03│■              ■│38 | GND      \u003c─── MAX7219 GND\n           I2C1 SDA | SPI0 SCK | GP2  | 04│●    ╭─╮       ●│37 | 3V3_EN\n           I2C1 SCL | SPI0 TX  | GP3  | 05│●    │ │       ●│36 | 3V3(OUT)\nUART1 TX | I2C0 SDA | SPI0 RX  | GP4  | 06│●    ╰─╯       ●│35 |          | ADC_VREF\nUART1 RX | I2C0 SCL | SPI0 CSn | GP5  | 07│●              ●│34 | GP28     | ADC2\n                                 GND  | 08│■              ■│33 | GND      | AGND\n           I2C1 SDA | SPI0 SCK | GP6  | 09│●   ┌─────┐    ●│32 | GP27     | ADC1     | I2C1 SCL\n           I2C1 SCL | SPI0 TX  | GP7  | 10│●   │     │    ●│31 | GP26     | ADC0     | I2C1 SDA\nUART1 TX | I2C0 SDA | SPI1 RX  | GP8  | 11│●   │     │    ●│30 | RUN\nUART1 RX | I2C0 SCL | SPI1 CSn | GP9  | 12│●   └─────┘    ●│29 | GP22\n                                 GND  | 13│■              ■│28 | GND\n           I2C1 SDA | SPI1 SCK | GP10 | 14│●              ●│27 | GP21     |          | I2C0 SCL\n           I2C1 SCL | SPI1 TX  | GP11 | 15│●              ●│26 | GP20     |          | I2C0 SDA\nUART0 TX | I2C0 SDA | SPI1 RX  | GP12 | 16│●              ●│25 | GP19     | SPI0 TX  | I2C1 SCL\nUART0 RX | I2C0 SCL | SPI1 CSn | GP13 | 17│●              ●│24 | GP18     | SPI0 SCK | I2C1 SDA\n                                 GND  | 18│■              ■│23 | GND\n           I2C1 SDA | SPI1 SCK | GP14 | 19│●              ●│22 | GP17     | SPI0 CSn | I2C0 SCL | UART0 RX\n           I2C1 SCL | SPI1 TX  | GP15 | 20│●     ● ■ ●    ●│21 | GP16     | SPI0 RX  | I2C0 SDA | UART0 TX\n                                          └────────────────┘\n                                                 ┆ ┆ ┆\n                                                 ┆ ┆ └╌ SWDIO\n                                                 ┆ └╌╌╌ GND\n                                                 └╌╌╌╌╌ SWCLK\n\nMAX7219 ↔ Pico Wiring Summary:\n──────────────────────────────\nVCC   → VBUS    (Pin 40)\nGND   → GND     (Pin 38 or 3 or 8 or 13 or 18 or 23 or 28 or 33)\nDIN   → GP3     (Pin 5)   — SPI0 TX\nCS    → GP5     (Pin 7)   — SPI0 CSn\nCLK   → GP2     (Pin 4)   — SPI0 SCK\n```\n---\n\n## 💻 Uploading to the Pico\n1. Flash MicroPython firmware to the Raspberry Pi Pico\n2. Use [Thonny](https://thonny.org/) to:\n   - Upload `main.py` and `max7219.py` to the Pico\n   - Set `main.py` as the startup script\n3. Open Thonny’s serial terminal to view logs or test input commands\n\n---\n\n## 🌐 Running the Web UI\n\n### Option 1: Manual Setup\n1. Clone this repo on your desktop machine\n2. Install dependencies (Python 3.x)\n   ```bash\n   pip install flask pyserial\n   ```\n3. Run the web controller:\n   ```bash\n   python clients/web/server.py\n   ```\n4. Visit `http://localhost:5000` in your browser\n5. Select a serial port, click connect, and send effects!\n\n### Option 2: Install as System Service (Arch Linux)\nFor a production setup that starts automatically on boot:\n\n1. Clone this repo and navigate to the project directory\n2. Run the installation script as root:\n   ```bash\n   sudo ./install.sh\n   ```\n3. The service will be installed and started automatically\n4. Visit `http://localhost:5123` or `http://YOUR_IP:5123` in your browser\n\n**Service Management:**\n```bash\n# Check service status\nsudo systemctl status picopixels-server\n\n# Start/stop/restart service\nsudo systemctl start picopixels-server\nsudo systemctl stop picopixels-server\nsudo systemctl restart picopixels-server\n\n# View live logs\nsudo journalctl -u picopixels-server -f\n\n# Update the service (run from project directory)\nsudo picopixels-update\n```\n\n**Features of the service installation:**\n- Runs as dedicated `picopixels` user with minimal privileges\n- Automatically starts on system boot\n- Includes security hardening\n- Easy update mechanism\n- Proper logging via systemd journal\n\n---\n\n## 🛠️ Commands (via Web UI or Serial)\n- `start \u003ceffect\u003e` – Start looping animation\n- `stop` – Stop current animation\n- `\u003ceffect\u003e` – Run effect once (e.g. `test`, `border`, `on`, `off`)\n- `brightness \u003c0-15\u003e` – Set brightness\n- `speed \u003cms\u003e` – Set speed of animation\n- `text \u003cmessage\u003e` – Set scrolling text\n- `clock [12/24] [seconds/noseconds] [blink/noblink]`\n- `help` – Show command list\n-\n\n---\n\n## 📸 Screenshots\n![Home](docs/home.png \"Home\")\n![Pong](docs/output.gif \"Pong\")\n---\n\n\n## 3D Printed Enclosure\nThe enclosure was designed using [FreeCAD](https://www.freecad.org/)\nThe Pi Pico holder was downloaded from [Raspberry Pi Pico Case](https://www.printables.com/model/143745-raspberry-pi-pico-case)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanonet%2Fpicopixels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseanonet%2Fpicopixels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseanonet%2Fpicopixels/lists"}