Replies: 1 comment
-
sorry, I have solved swapping the 2 line: mxconfig.double_buff = true; //before this dma_display = new MatrixPanel_I2S_DMA(mxconfig); //and then this: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HI
I'm having problems updating the matrix specifically, I'm using an ESP32-WROOM32 with a 64x32 pixel HUB75 matrix and the adafruit_dust.h library and I notice a flickering while updating the data on the matrix. (I've already used your library with the animated GIF demo without this problem so the wiring and matrix setup is ok).
I tried changing the brightness, the matrix update speed (by inserting a delay) but all without success.
I think I understand that the problem is precisely the “fillScreen(0)” or “clearscreen()” command. in fact if I delete it I no longer have flickering (but obviously all the pixels are overwritten). Another strange thing is that if I remove the final line (which should send the data to the matrix at each loop turn” dma_display->flipDMABuffer(); “ I still get the pixels on the matrix but with reduced brightness (and unfortunately there is flickering in this case too)
I also tried to insert mxconfig.double_buff = true in the SETUP; as reported in this other post: #361
but it doesn't solve my problem :-(
Where am I doing wrong?
thanks soo mutch
Below is the LOOP code:
`void loop() {
uint32_t t;
while(((t = micros()) - prevTime) < (1000000L / MAX_FPS)); //this is for the refresh delay
prevTime = t;
mpu6050.update(); // Update accelerometer data
double xx, yy, zz;
xx = mpu6050.getAccX() * 10000; // Gets the acceleration on the X axis
yy = mpu6050.getAccY() * -10000; // Gets the acceleration on the Y axis with a minus sign to flip the axis based on the physical position of my accelerometer ;-)
zz = mpu6050.getAccZ() * 10000; // Gets the acceleration on the Z axis
// Run a frame of the simulation
sand.iterate(xx, yy, zz);
// Update the pixel data in the LED driver
dimension_t x, y;
dma_display->fillScreen(0);
//dma_display->clearScreen(); //for testing only --- same result as the line immediately above
for(int i=0; i<N_GRAINS ; i++) {
sand.getPosition(i, &x, &y);
int n = i / ((WIDTH / N_COLORS) * BOX_HEIGHT); // Color index
uint16_t flakeColor = colors[n];
dma_display->drawPixel(x, y, flakeColor);
//dma_display->writePixel(x, y, flakeColor); //for testing only --- same result as the line immediately above
//dma_display->drawPixelRGB888(x, y, 255, 255, 255); // solo per prova //for testing only --- same result as the line immediately above
}
dma_display->flipDMABuffer(); // Show the data on the array - if I remove it, the pixels still appear, but with less intensity (and unfortunately still with flickering)
}
`
Beta Was this translation helpful? Give feedback.
All reactions