Update SmoothDoubleBuffer.ino

This commit is contained in:
mrfaptastic 2021-08-19 19:43:49 +01:00
parent 8dd6bf51b8
commit aa0c7785b2

View file

@ -26,7 +26,6 @@ void setup()
display = new MatrixPanel_I2S_DMA(mxconfig); display = new MatrixPanel_I2S_DMA(mxconfig);
display->begin(); // setup display with pins as pre-defined in the library display->begin(); // setup display with pins as pre-defined in the library
display->setTextColor(display->color565(255, 255, 255));
start_x = display->width(); start_x = display->width();
} }
@ -49,12 +48,14 @@ void loop()
if (buffer_id) if (buffer_id)
{ {
display->setCursor(3, row1); display->setCursor(3, row1);
display->setTextColor(display->color565(200, 0, 0));
display->fillRect(start_x, 6, square_size, square_size, display->color565(200,0,0)); display->fillRect(start_x, 6, square_size, square_size, display->color565(200,0,0));
//delay(40); // simulate slow drawing operation //delay(40); // simulate slow drawing operation
} }
else else
{ {
display->setCursor(3, row2); display->setCursor(3, row2);
display->setTextColor(display->color565(0, 200, 0));
display->fillRect(10, start_x, square_size, square_size, display->color565(0,200,0)); display->fillRect(10, start_x, square_size, square_size, display->color565(0,200,0));
} }