P4(1921)-80x40-10S-V20 matrix and the SmartMatrix library

My project is very large, there is an Ethernet module and a web application, and requests, etc., and only a small part of the project is related to LED matrix. If I post the whole project to you, it will confuse you more, so it’s better in parts.

As a test, you can use the FeatureDemo.ino sketch from SmartMatrix examples, everything works there. I will give it in already modified form - SmartMatrix_test_all_Features_HUB75.ino.

The rest of the files that I post, you should find in your system and replace with mine, I had them in C:\Users\my_name\Documents\Arduino\libraries\SmartMatrix-master\src

In the MatrixHardware_ESP32_V0.h file you find the ESP32 → HUB75 layout. Here is also schematic with latch.

In the MatrixCommonHub75.h file, I added my modules (at different times I came across 4 types of modules of different architectures), all of them are at the beginning of the list.
The MatrixPanelMaps.h file is related to the previous one, and describes the pixel mapping for each matrix type.

You can modify these files as you need.

But you should know the pixel mapping (how the logical pixels are distributed in the physical matrix), sometimes you can get it from the module supplier, and sometimes I had to find it myself, for this I used the C-Power controller from “Shenzhen Lumen Electronics”. With its “LedCenter” software it allows you to find the pixel mapping.

If your module uses 138-type chips for decoding lines (these are ordinary multiplexers-decoders), then everything should work for you thanks to the above, but if shift registers are used for decoding, for example DP32020, then you will need to add a device for converting line selection signals. It can be made on an Arduino Nano, for this following post will be useful.

You can download my files from this link

I wish you good luck,
Write if anything, I will try to help.