Raspberry Pi + Matrix Controller / Stage 3 of 3
Failure visibility
Show stale state after valid updates stop.
Firmware source authored · compile not attempted in this pass
Download stage 3 PlatformIO projectRead code & run steps ↓
What changes now?
Show stale state after valid updates stop.
Expected after hardware review: Unplugging/stopping the sender changes state after the five-second policy.
Builds on stage 2: Data presentation.
What you need
- P5 Indoor RGB LED Matrix Panel, 64×32
- ELEGOO ESP-WROOM-32 development board
- Raspberry Pi 4 Model B 4GB
- Verified panel-rated 5 V supply and harness · Additional hardware needed
- Compatible high-speed panel logic buffer/adapter · Additional hardware needed
Check availability and exact module markings before starting.
Connections / current hardware gate
Before connecting power. The Pi sends content; the classic ESP32 refreshes the panel. Panel power/harness, buffering and the physical USB/serial setup still need qualification.
- Complete the RGB panel's connector, scan, supply and buffer review first.
- Keep Linux sender software separate from the MCU firmware project; use the included companion files.
- Check the versioned line format and stale-state policy; this source does not implement a session handshake.
Conditional connection table and full module facts
Electrical review is incomplete. Conditional references require confirmation; unresolved pins or rails are not wiring instructions. Power off before changing connections.
| From device / pin | To device / pin | Signal / voltage | Connection status and notes |
|---|---|---|---|
ELEGOO ESP-WROOM-32 development boardGPIO25 | P5 Indoor RGB LED Matrix Panel, 64×32R1 | HUB75 R1 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO26 | P5 Indoor RGB LED Matrix Panel, 64×32G1 | HUB75 G1 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO27 | P5 Indoor RGB LED Matrix Panel, 64×32B1 | HUB75 B1 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO14 | P5 Indoor RGB LED Matrix Panel, 64×32R2 | HUB75 R2 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO13 | P5 Indoor RGB LED Matrix Panel, 64×32G2 | HUB75 G2 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO18 | P5 Indoor RGB LED Matrix Panel, 64×32B2 | HUB75 B2 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO23 | P5 Indoor RGB LED Matrix Panel, 64×32A | HUB75 A 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO19 | P5 Indoor RGB LED Matrix Panel, 64×32B | HUB75 B 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO21 | P5 Indoor RGB LED Matrix Panel, 64×32C | HUB75 C 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO22 | P5 Indoor RGB LED Matrix Panel, 64×32D | HUB75 D 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO17 | P5 Indoor RGB LED Matrix Panel, 64×32LAT | HUB75 LAT 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO32 | P5 Indoor RGB LED Matrix Panel, 64×32OE | HUB75 OE 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
ELEGOO ESP-WROOM-32 development boardGPIO16 | P5 Indoor RGB LED Matrix Panel, 64×32CLK | HUB75 CLK 3.3 V | Conditional reference Controller reference through an appropriate verified buffer; connector position/polarity not established by this table. This row identifies the 3.3 V MCU signal assignment, not a direct-wire approval: route through missing:hub-buffer after its voltage, speed and connector review; keep panel power separate. |
P5 Indoor RGB LED Matrix Panel, 64×32VCC/GND | Verified panel-rated 5 V supply and harnessreviewed output/harness | Separate panel power 5 V | Conditional reference Exact amperage and wire/connector/protection budget unresolved. Never through MCU regulator/GPIO. |
Raspberry Pi 4 Model B 4GBUSB host | ELEGOO ESP-WROOM-32 development boardUSB connector | USB serial protocol Voltage unresolved | Conditional reference No GPIO UART wire or mixed power rail is used in this baseline. |
display/peripheralGND | controllerGND | Signal reference 0 V | Conditional reference Unpowered wiring check; use correct common-ground topology and keep high-current panel returns out of thin signal paths. |
Access describes the source of a requirement. Check availability, the exact revision and the complete power/driver/harness system before starting. Inventory quantities are expected purchase/BOM quantities, not live stock.
- P5 Indoor RGB LED Matrix Panel, 64×32Club-owned
product family verified · preflight required
Compatibility and unresolved details
- Resolution: 64 × 32
- Module size: 320 × 160 mm
- Pixel pitch: 5 mm / P5
- Scan mode: 1/16 scan
- LED package class: SMD2121 class
- Input voltage: 5 V class
- Construction: Indoor full-color RGB, black mask
- Interface class: HUB75-style; verify actual connector pinout before wiring
- ELEGOO ESP-WROOM-32 development boardClub-owned
product family verified · preflight required
Compatibility and unresolved details
- Headers/USB bridge: Exact carrier count and bridge unverified
- Raspberry Pi 4 Model B 4GBClub-owned
product family verified · preflight required
- Verified panel-rated 5 V supply and harnessAdditional hardware needed
identity blocked · not established
Compatibility and unresolved details
- Panel amperage, connectors, protection and source capability are not established.
- Compatible high-speed panel logic buffer/adapterAdditional hardware needed
identity blocked · not established
Compatibility and unresolved details
- Select from verified panel thresholds and chosen controller/clock; generic I²C shifter is not a HUB75 solution.
Use this complete project
Target: esp32dev · Environment: checkpoint3 · Stage branch: DISPLAY_STAGE=3
- Open the complete project. Download the stage ZIP, extract it and open the folder containing
platformio.iniandsrcin VS Code. Keep its supporting headers and libraries together. - Build stage 3. Select
checkpoint3in PlatformIO Project Tasks → General → Build, or use a PlatformIO terminal:
A successful Build compiles the program; it does not upload it or approve electrical connections.pio run -e checkpoint3 - Stop at the hardware gate. The supplied electrical-review flag remains false. Have a qualified reviewer complete the actual module, wiring and power checks before using an approved configuration for hardware operation.
As supplied, Serial at 115200 baud reports
STOP: complete wiring/power review in guide before enabling hardware.and initialization stops.
After electrical review: Upload and Monitor
Only with the actual setup reviewed and the configuration explicitly approved, choose this stage's Upload task. Close any monitor using the board first.
pio run -e checkpoint3 -t uploadOpen the matching Monitor at 115200 baud, then compare the expected result with what actually happens.
pio device monitor -b 115200Record Build, Upload and physical observations separately.
Complete source
The viewer starts at src/main.cpp. Use Source file for the board profile, PlatformIO configuration and supporting code. Keep the complete ZIP together.
workspaces/pi-matrix-controller/src/main.cpp
#include <Arduino.h>
#include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
#include <DisplayCore.h>
#include "board_profile.h"
MatrixPanel_I2S_DMA* panel=nullptr;uint32_t lastFrame=0;
displaylab::Receiver receiver;char inputLine[49]={};size_t used=0;bool discard=false;
void readMessages(uint32_t now){unsigned budget=64;
while(budget--&&Serial.available()){const char c=char(Serial.read());
if(c=='\r')continue;
if(c=='\n'){if(!discard){inputLine[used]='\0';displaylab::Packet p;if(displaylab::parsePacket(inputLine,p))receiver.accept(p,now);}used=0;discard=false;}
else if(!discard){if(used<sizeof(inputLine)-1)inputLine[used++]=c;else{discard=true;used=0;}}
}}
void setup(){Serial.begin(115200); if(!kElectricalReviewComplete){Serial.println("STOP: complete wiring/power review in guide before enabling hardware.");return;}HUB75_I2S_CFG cfg(64,32,1);
cfg.gpio.r1=25;cfg.gpio.g1=26;cfg.gpio.b1=27;cfg.gpio.r2=14;cfg.gpio.g2=13;cfg.gpio.b2=18;
cfg.gpio.a=23;cfg.gpio.b=19;cfg.gpio.c=21;cfg.gpio.d=22;cfg.gpio.e=-1;
cfg.gpio.lat=17;cfg.gpio.oe=32;cfg.gpio.clk=16;
cfg.double_buff=true;panel=new MatrixPanel_I2S_DMA(cfg);if(!panel->begin()){Serial.println("DMA allocation/init failed");delete panel;panel=nullptr;return;}
panel->setBrightness8(16);panel->clearScreen();}
void loop(){if(!panel)return;uint32_t now=millis();readMessages(now);if(!displaylab::elapsed(now,lastFrame,33))return;lastFrame=now;panel->fillScreen(0);panel->setCursor(0,0);panel->print(receiver.stale(now)?"STALE":"LIVE");panel->setCursor(0,12);panel->print(receiver.last.value);
#if DISPLAY_STAGE >= 2
panel->fillRect(0,25,receiver.last.value*64U/1000U,7,panel->color565(0,100,255));
#endif
#if DISPLAY_STAGE >= 3
panel->drawPixel(63,0,receiver.stale(now)?panel->color565(255,0,0):panel->color565(0,255,0));
#endif
panel->flipDMABuffer();}
Source integrity · SHA-256
9c52665a4c48481b7a86422f3527e6d017daa25202c197c23f30b87b6dab90d1Raw downloads and standalone ZIPs retain the canonical bytes and supporting files. Copy follows the selected Comments setting.
Check the result
Unplugging/stopping the sender changes state after the five-second policy.
As supplied, the false electrical-review flag prevents this hardware result. After qualified review, record what actually happens; the text above is an expected result, not a bench transcript.
Original verification checklist
- Resolve the exact vendor driver/source/version/license.
- Review actual carrier power and pins.
- Author and compile the physical target before upload and bench testing.
Troubleshooting
Bytes arrive but no value changes
Check newline, version, range, checksum and sequence. Confirm that a rejected frame cannot refresh freshness.
First reconnect fails
Review sender reset/sequence policy rather than assuming all lost links are wiring faults. Resetting the receiver is the baseline reconnect procedure.
UI stalls on serial flood
Check bounded per-visit work and overflow discard behavior. Unbounded reads can starve rendering.
Technical explanation / original guide
Read the complete original stage guide
Original source/research wording is preserved. The stage's dated build evidence above supersedes earlier blanket compile-status wording; no physical results are implied.
Build it
Show stale state after valid updates stop.
Open workspaces/pi-matrix-controller in VS Code/PlatformIO. Select checkpoint3 and run pio run -e checkpoint3. This is FIRMWARE_SOURCE_AUTHORED with embedded compilation unverified. Review the electrical flag and canonical conditional wiring before any upload.
Understand it
The sender companion uses PySerial with timeouts, a one-second rate and a short USB-open delay for boards that reset on port open. The MCU has a 48-character line payload, discards an overlong line until newline, and reads at most sixty-four bytes per loop visit. Complete lines are parsed before state mutation. Sequence comparison uses unsigned modular distance and a half-range ordering rule. A restarted sender beginning at zero may be rejected until the receiver is reset or a future session protocol is added; this limitation is explicit.
Source review precision: All environments parse the bounded V1 line protocol and display LIVE/STALE. Checkpoint2 adds the bar and checkpoint3 adds a status pixel. The checksum is an accidental-corruption check, not authentication. A restarted sender can require a receiver reset because there is no session handshake.
Expected result and verification
Unplugging/stopping the sender changes state after the five-second policy.
This is expected after a correct build and electrical review, not a captured bench transcript.
Check the selected source branch and named failure conditions. Record actual build or software output separately from future physical observations.
Likely failures
Bytes arrive but no value changes: Check newline, version, range, checksum and sequence. Confirm that a rejected frame cannot refresh freshness.
First reconnect fails: Review sender reset/sequence policy rather than assuming all lost links are wiring faults. Resetting the receiver is the baseline reconnect procedure.
UI stalls on serial flood: Check bounded per-visit work and overflow discard behavior. Unbounded reads can starve rendering.
Build evidence, target and remaining verification
Original status: unverified.
No successful build for this stage is recorded in the dated embedded compile ledger.
No compile was attempted in this pass under the user's testing limit. Upload and physical bench observation remain untested.
espressif32@6.12.0 · arduino
Diagnostics before integration
- RGB channels and scan/profile gates Environment: checkpoint1