This repository contains the code for driving a 64x32 HUB75 LED Matrix like those sold by adafruit over WiFi with a Raspberry Pi Pico. For WiFi a ESP-01s is used. The communication protocol is custom to simplify the code and the frames are compressed using ZSTD to increase throughput. It's possible to achieve around 28 FPS. Please see my Reddit post for more details.
This program has some very bad documentation, but here are the basics to get started:
- Connect a Raspberry Pi Pico to a HUB75 LED Matrix. The pin configuration is the same as shown here.
- Connect a ESP-01S over UART to pin 16 and 17 on the Pico.
- Clone this repo (make sure to specify --recursive)
- Adjust WiFi name and password (mkdir build; cmake .. -DCMAKE_BUILD_TYPE=Release "-DWIFI_PASSWORD=1234" "-DWIFI_NAME=a b c")
- Adjust hostname to connect to (see main.c, mine is sauron or mqtt)
- Compile and upload the program (cp build/ledmatrix_pico.uf2 /path/to/pico)
The communication protocol works as follows:
- Every packet starts with S
- Then comes the length of the remaining packet as ascii after the colon
- Then comes the colon (':')
- Then comes the data
The client starts of by sending it's id in the data packet. Then it will receive data packets constantly, containing the frame data as a zstd compressed RGB888 64x32 row-first bitmap.
If you have any questions, feel free to contact me via reddit or e-mail (address see commits).