mrcodetastic/ESP32-HUB75-MatrixPanel-DMA

S-P4-2020-A3 origin pixel issue

Parthenergycloud opened this issue · 3 comments

Hello,
I have used P4-2020_A3 RGB Panel on my side.
I order this panel from Here,
https://evelta.com/rgb-full-color-led-matrix-panel/

I have connected 4 panels in a zigzag manner with esp32 HUB75 shield.


Chain of 4x 64x32 panels for this example:
+---------+---------+
| 2 | 1 |
| | (ESP32) |
+---------+---------+
| 4 | 3 |
| | |
+---------+---------+
Here is the image of HUB75 with esp32.
HUB75_ESP32

I used ESP32-HUB75-MatrixPanel-DMA library for connecting 4 panels and i used Chainedpanels example form library.
In that i found some error in displaying.

→ Error i facing for display something in Chain of 4x 64x32 panels

First line of the display is shifted last line you can see in below image.

PanalAlignment

Error

→ In this image you can see that my first line is shifted in last line and i setup panels according to numbers.

→ Second thing is panal 4 first line is shifted in panel 1 last line and panel 2 first line shifted to panel 3 first line.

"I want solution of this problem of shifting line"

Here, is the example code which i used.
`#include <ESP32-VirtualMatrixPanel-I2S-DMA.h>
// #include "FreeSerif9pt7b.h"

#define PANEL_RES_X 64
#define PANEL_RES_Y 32
#define NUM_ROWS 2
#define NUM_COLS 2
#define PANEL_CHAIN NUM_ROWS * NUM_COLS

#define VIRTUAL_MATRIX_CHAIN_TYPE CHAIN_TOP_RIGHT_DOWN_ZZ

MatrixPanel_I2S_DMA *dma_display = nullptr;
VirtualMatrixPanel *virtualDisp = nullptr;

int scrollPos = 0; // Initial position for text scrolling

void setup() {
HUB75_I2S_CFG mxconfig(
PANEL_RES_X,
PANEL_RES_Y,
PANEL_CHAIN
);

dma_display = new MatrixPanel_I2S_DMA(mxconfig);
dma_display->setBrightness8(255);
dma_display->begin();

virtualDisp = new VirtualMatrixPanel((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y, VIRTUAL_MATRIX_CHAIN_TYPE);

virtualDisp->setPhysicalPanelScanRate(NORMAL_TWO_SCAN);
// virtualDisp->setFont(&FreeSerif9pt7b);
virtualDisp->setTextColor(virtualDisp->color565(0, 0, 255));
virtualDisp->setTextSize(2);
}

void loop() {
// Clear previous text
virtualDisp->fillScreen(virtualDisp->color565(0, 0, 0));

// Print text at the current scroll position
virtualDisp->setCursor(scrollPos, 0);
virtualDisp->print("HELLO");

// Increment scroll position
scrollPos--;

// Reset scroll position if text has scrolled completely off the display
if (scrollPos < -(virtualDisp->width())) {
scrollPos = virtualDisp->width();
}

// virtualDisp->swapBuffers(false);
virtualDisp->setTextWrap(false);
// Delay to control scrolling speed
delay(20); // Adjust as needed
}`

Here is video for running above code in the panel.

In video you can see that when my hello is reach to first line i moves to last line of 2nd ROW display.

20240306_114610.2.mp4

Anyone has a solution for this problem? @mrfaptastic
Please help me to solve this problem.

Clkphase?

Perhaps similar to this post:

#545 (comment)

Clkphase?

After following your suggestions of clkphase i set my clkphase set to false my issue is solved.
And Thank you for your support.😊