mrcodetastic / ESP32-HUB75-MatrixPanel-DMA

An Adafruit GFX Compatible Library for the ESP32, ESP32-S2, ESP32-S3 to drive HUB75 LED matrix panels using DMA for high refresh rates. Supports panel chaining.
MIT License
894 stars 200 forks source link

128X64 MatrixPanel Problem (not resolved) #485

Open dowandev opened 11 months ago

dowandev commented 11 months ago

Hello, when I apply the code attached below, some parts are blank like in the picture. How do I modify or wire the code?

20230805_001022.jpg

20230803_183610.jpg

// 1) Include key virtual display library // VERSION 3.0.7

include

include <Fonts/FreeMono9pt7b.h>

// 2) Set configuration

define PANEL_RES_X 128 // Number of pixels wide of each INDIVIDUAL panel module.

define PANEL_RES_Y 64 // Number of pixels tall of each INDIVIDUAL panel module.

define NUM_ROWS 1 // Number of rows of chained INDIVIDUAL PANELS

define NUM_COLS 1 // Number of INDIVIDUAL PANELS per ROW

define PANEL_CHAIN NUM_ROWS *NUM_COLS // total number of panels chained one to another

/* Configure the serpetine chaining approach. Options are: CHAIN_NONE, CHAIN_TOP_LEFT_DOWN, CHAIN_TOP_RIGHT_DOWN, CHAIN_BOTTOM_LEFT_UP, CHAIN_BOTTOM_RIGHT_UP, CHAIN_TOP_LEFT_DOWN_ZZ, /// ZigZag chaining. Might need a big ass cable to do this, all panels right way up. CHAIN_TOP_RIGHT_DOWN_ZZ, CHAIN_BOTTOM_RIGHT_UP_ZZ, CHAIN_BOTTOM_LEFT_UP_ZZ

The location (i.e. 'TOP_LEFT', 'BOTTOM_RIGHT') etc. refers to the starting point where the ESP32 is located, and how the chain of panels will 'roll out' from there.

In this example we're using 'CHAIN_BOTTOM_LEFT_UP' which would look like this in the real world:

Chain of 4 x 64x32 panels with the ESP at the CHAIN_TOP_LEFT_DOWN:

+---------+---------+ 4 3

+---------+---------+ | 1 | 2 | | (ESP) | | +---------+---------+

*/

define VIRTUAL_MATRIX_CHAIN_TYPE CHAIN_TOP_RIGHT_DOWN

// 3) Create the runtime objects to use

// placeholder for the matrix object MatrixPanel_I2S_DMA *dma_display = nullptr;

// placeholder for the virtual display object VirtualMatrixPanel *virtualDisp = nullptr;

/**

}

void loop(){

}

dowandev commented 11 months ago

@mrfaptastic Sorry, Can you help me?

board707 commented 11 months ago

Single geometry of the matrix like "128x64" is not enough to manage it to work. We need a more detail. Is it a scan32 matrix? Or scan 16 or scan8? What the chips are used as drivers?

dowandev commented 11 months ago

@board707 It is 1/32 scan and uses ICND2038S chip

Product Link : https://aliexpress.com/item/32957597916.html?spm=a2g0o.order_list.order_list_main.5.4834140f7jcQe4&gatewayAdapt=glo2kor

mrcodetastic commented 11 months ago

Can you please try with the simpletestshapes sketch?

dowandev commented 11 months ago

@mrfaptastic

I think the problem was caused by not uncommenting //mxconfig.gpio.e = 18. Please tell me how to apply //mxconfig.gpio.e = 18; to BitMapIcons.

Apply the code below to make it look like the picture. I don't know if this is displayed well, but it is displayed normally. But in BItMapIcons //mxconfig.gpio.e = -1; When I uncomment // Assign a pin if you have a 64x64 panel and apply, I get a Compilation error: 'mxconfig' does not name a type error.

20230806_210911.jpg

20230806_210330.jpg

mrcodetastic commented 11 months ago

Looks like there's a bug with the VirtualMatrixPanel class when using it with a single panel (which there is no need to use this class for), which I'll need to investigate.

Now using the underlying library to draw directly to the panel - looks like it works for me. I can't understand your gpio.e compile error comment unless you provide the actualy sketch code.