You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello everyone, when I use the code below for two P5 32x64 LED panels, I encounter ghosting issues. Can anyone help me? I don't know what is causing it.
Thanks and best regards,
My Code
#include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
#include <FastLED.h>
Hello everyone, when I use the code below for two P5 32x64 LED panels, I encounter ghosting issues. Can anyone help me? I don't know what is causing it.
Thanks and best regards,
My Code
#include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
#include <FastLED.h>
// GPIO Configuration
#define R1_PIN 25
#define G1_PIN 26
#define B1_PIN 27
#define R2_PIN 21
#define G2_PIN 22
#define B2_PIN 23
#define A_PIN 12
#define B_PIN 16
#define C_PIN 17
#define D_PIN 18
#define E_PIN -1
#define CLK_PIN 15
#define LAT_PIN 32
#define OE_PIN 33
// Matrix Configuration
#define MATRIX_WIDTH 128
#define MATRIX_HEIGHT 64
#include <ESP32-VirtualMatrixPanel-I2S-DMA.h>
#define PANEL_RES_X 64
#define PANEL_RES_Y 32
#define NUM_ROWS 2
#define NUM_COLS 1
#define PANEL_CHAIN NUM_ROWS *NUM_COLS
#define VIRTUAL_MATRIX_CHAIN_TYPE CHAIN_TOP_LEFT_DOWN
MatrixPanel_I2S_DMA *dma_display = nullptr;
VirtualMatrixPanel virtualDisp = nullptr;
// Thêm biến buffer
uint16_t screenBuffer = nullptr;
void setup() {
Serial.begin(115200);
delay(2000);
// Matrix Configuration
HUB75_I2S_CFG mxconfig(PANEL_RES_X, PANEL_RES_Y, PANEL_CHAIN);
mxconfig.gpio.r1 = R1_PIN;
mxconfig.gpio.g1 = G1_PIN;
mxconfig.gpio.b1 = B1_PIN;
mxconfig.gpio.r2 = R2_PIN;
mxconfig.gpio.g2 = G2_PIN;
mxconfig.gpio.b2 = B2_PIN;
mxconfig.gpio.a = A_PIN;
mxconfig.gpio.b = B_PIN;
mxconfig.gpio.c = C_PIN;
mxconfig.gpio.d = D_PIN;
mxconfig.gpio.e = E_PIN;
mxconfig.gpio.clk = CLK_PIN;
mxconfig.gpio.lat = LAT_PIN;
mxconfig.gpio.oe = OE_PIN;
mxconfig.i2sspeed = HUB75_I2S_CFG::HZ_20M;
dma_display = new MatrixPanel_I2S_DMA(mxconfig);
dma_display->setBrightness8(128);
if (!dma_display->begin()) {
Serial.println("I2S memory allocation failed!");
return;
}
virtualDisp = new VirtualMatrixPanel((*dma_display), NUM_ROWS, NUM_COLS, PANEL_RES_X, PANEL_RES_Y, VIRTUAL_MATRIX_CHAIN_TYPE);
drawStaticContent();
}
void loop() {
}
void drawStaticContent() {
int centerX = virtualDisp->width() / 2;
int centerY = virtualDisp->height() / 2;
int colorGreen = virtualDisp->color565(0, 255, 0); // Màu xanh lá cây tươi
int colorWhite = virtualDisp->color565(255, 255, 255); // Màu trắng
virtualDisp->fillScreen(0); // Xóa màn hình một lần duy nhất
virtualDisp->setTextColor(colorWhite);
virtualDisp->setTextSize(3);
virtualDisp->setCursor(centerX - 18, centerY - 10); // Căn chỉnh chữ giữa màn hình
virtualDisp->print("OM");
}
The text was updated successfully, but these errors were encountered: