-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
all columns shifted one pixel left, column 0 is shown on right side of panel #8
Comments
Another problem is that the Panel starts to show ghosting as soon as WiFi is active (as soon as the ESP32 joins an access point), which makes it useless for me... |
Can you post an example sketch of your code ? Ghosting is probably caused by electrical interference due to the wiring - not much that can be done there. What module are you using? |
Thanks a lot for your reply.
|
When I set a green pixel at (0,23), the pixel is shown also on the right side, and the ghosting pixel one row above with reduced intensity, see second picture on that page: matrix.drawPixel(0, 0, matrix.color444(255, 255, 255)); |
In line 251 of ESP32-RGB64x32MatrixPanel-I2S-DMA.cpp, there is:
Can you comment out this bit and see what happens? If that changes nothing, on line 236 there's:
Can you change it to:
And see what happens? I can't replicate this issue with my panel. Not all of these panels are made exactly the same it seems. Thanks. |
Hello, I see this issue went stale, but I have a panel with a similar problem. All of the columns are also shifted one pixel left, where column 0 is on the right side of the panel. I don't know if this is relevant, but there is also a little bit of vertical ghosting in column 0 (nowhere else). My panel is 64x64 and a MBI5124 variant, and I put together my code from the examples. I see that you mentioned some possible fixes before you closed the issue, but I can't find those lines of code in the most recent release. #include <ESP32-HUB75-MatrixPanel-I2S-DMA.h>
#include <FastLED.h>
// Configure for your panel(s) as appropriate!
#define PANEL_WIDTH 64
#define PANEL_HEIGHT 64 // Panel height of 64 will required PIN_E to be defined.
#define PANELS_NUMBER 1 // Number of chained panels, if just a single panel, obviously set to 1
#define PIN_E 32
MatrixPanel_I2S_DMA *dma_display = nullptr;
uint16_t colorWheel(uint8_t pos) {
if(pos < 85) {
return dma_display->color565(pos * 3, 255 - pos * 3, 0);
} else if(pos < 170) {
pos -= 85;
return dma_display->color565(255 - pos * 3, 0, pos * 3);
} else {
pos -= 170;
return dma_display->color565(0, pos * 3, 255 - pos * 3);
}
}
void drawText(int colorWheelOffset)
{
// draw text with a rotating colour
dma_display->setTextSize(1); // size 1 == 8 pixels high
dma_display->setTextWrap(false); // Don't wrap at end of line - will do ourselves
dma_display->setCursor(5, 0); // start at top left, with 8 pixel of spacing
uint8_t w = 0;
const char *str = "ESP32 DMA";
for (w=0; w<strlen(str); w++) {
dma_display->setTextColor(colorWheel((w*32)+colorWheelOffset));
dma_display->print(str[w]);
}
dma_display->println();
dma_display->print(" ");
for (w=9; w<18; w++) {
dma_display->setTextColor(colorWheel((w*32)+colorWheelOffset));
dma_display->print("*");
}
dma_display->println();
dma_display->setTextColor(dma_display->color444(15,15,15));
dma_display->println("LED MATRIX!");
// print each letter with a fixed rainbow color
dma_display->setTextColor(dma_display->color444(0,8,15));
dma_display->print('3');
dma_display->setTextColor(dma_display->color444(15,4,0));
dma_display->print('2');
dma_display->setTextColor(dma_display->color444(15,15,0));
dma_display->print('x');
dma_display->setTextColor(dma_display->color444(8,15,0));
dma_display->print('6');
dma_display->setTextColor(dma_display->color444(8,0,15));
dma_display->print('4');
// Jump a half character
dma_display->setCursor(34, 24);
dma_display->setTextColor(dma_display->color444(0,15,15));
dma_display->print("*");
dma_display->setTextColor(dma_display->color444(15,0,0));
dma_display->print('R');
dma_display->setTextColor(dma_display->color444(0,15,0));
dma_display->print('G');
dma_display->setTextColor(dma_display->color444(0,0,15));
dma_display->print("B");
dma_display->setTextColor(dma_display->color444(15,0,8));
dma_display->println("*");
}
void setup() {
HUB75_I2S_CFG mxconfig;
mxconfig.mx_height = PANEL_HEIGHT; // we have 64 pix heigh panels
mxconfig.chain_length = PANELS_NUMBER; // we have 2 panels chained
mxconfig.gpio.e = PIN_E; // we MUST assign pin e to some free pin on a board to drive 64 pix height panels with 1/32 scan
mxconfig.driver = HUB75_I2S_CFG::MBI5124;
mxconfig.i2sspeed = HUB75_I2S_CFG::HZ_10M;
dma_display = new MatrixPanel_I2S_DMA(mxconfig);
dma_display->begin(); // use default pins
dma_display->setPanelBrightness(64);
dma_display->setLatBlanking(2);
}
uint8_t wheelval = 0;
void loop() {
drawText(wheelval);
wheelval +=1;
delay(20);
} |
Experienced the same issue as the above comments. First column (x_coord = 0 ) was shifted to the right side of the board rather than the left. The solution involved editing ESP32-HUB75-MatrixPanel-I2S-DMA.cpp line 366 x_coord = ESP32_TX_FIFO_POSITION_ADJUST(x_coord)+1; |
Did you try adjusting the 'clkphase' value? |
Thanks for this work, I plan to use that lib as it works best of all I saw.
However one thing I cannot easily find how to correct:
I use a standard p3 panel 64x32, 1/16 scan. All works so far, but all pixels with x=0 show on the rightmost column instead of the leftmost, and all pixels with x=63 show on column 63 instead 64. So all pixels are shifted left one column, and the leftmost appears at column 64.
I wonder why since my panel is standard and I also used it already with other libs.
Thanks in advance!
The text was updated successfully, but these errors were encountered: