I find it very interesting, using the Adafruit Medium RGB Matrix Panel (16×32 Pixel) with the ESP32. Unfortunately, until now, the Adafruit libraries did not support the ESP32 for driving the Matrix Panel.
Therefore I started migrating the Adafruit RGB-Matrix-Panel library to support the ESP32 as well.
At first I’ll look into the hardware connection between the ESP32 Development Kit and the RGB Matrix Panel. Adafruit describes the connection using jumper wires in their blog. Unfortunately, we cannot use this easy type of connection as the RGB matrices expect 5V I/O voltage and the ESP32 does only deliver 3.3V.
I’ve tested using 3.3V I/O Voltage to drive the RGB Matrix but it did not show the pictures clearly. For this reason, we will build an I/O level shifter board to connect the RGB Matrix and the ESP32 Development Board.
To make the soldering as easy as possible, we created a very lean board layout.
These two pictures show the top and bottom layout of the level shifter board. Even beginners should be able to correctly solder this board.
At first, we placed the components onto the board as shown in this picture and soldered one point to fix the components.
To make the connection easier, we bend the pins of the level shifter chips to the outside, so that we can directly solder them to the pin headers.
After that, we solder the pins together and finish with connecting the power leads using silver wire. At the end, it should look like in the following two pictures.
Connecting ESP32 and RGB Matrix using Level Shifter board
The following diagram shows the required connections between the ESP32 board, the level shifter board and the RGB Matrix Panel. Additionally, you need to connect the power cable of the Matrix panel to the screw terminals of the level shifter board and the barrel jack connector of the 5V power supply to the level shifter board.
The following table shows the resulting pin to pin definitions.
Level Shifter Input
Level Shifter Output
RGB Matrix Pin
We use the Arduino IDE and the Adafruit RGB Matrix Panel Library to drive the Matrix Panel. The Adafruit GFX Library is used to easily draw graphics on the panel.
At first, we install the Arduino IDE on your computer. Please download the Arduino IDE and install it according to your operating system. Download from arduino.cc.
We need a couple of libraries and the board support package to get started.
The easiest way to make your Arduino IDE compatible to the ESP32 is to use the board manager URL. Please copy the following URL:
Then open the Arduino IDE and go to “Preferences”. Then add the URL to the field “Additional Board Manager URLs”
Next, click OK to close the Dialog.
Next, go to “Tools -> Board -> Boards Manager”. The Arduino IDE will not start to download the indexes from the board manager URLs and show the results to you.
Then search for “esp32” and install the resulting board support package by espressif.
After clicking “Install”, the IDE will download the BSP including compilers and toolchain. This may take some time.
But after that, you are able to compile and run sketches on your ESP32 board.
Adafruit GFX Library
Open the Library Manager from the Tools menu and search for the Adafruit GFX Library and click install.
Adafruit RGB Matrix Panel Library
Unfortunately, you cannot use the Library Manager to install the current version of this library that supports running the panel using the ESP32. Therefore we need to install the library manually using the current source code from GitHub.