Update SmoothDoubleBuffer.ino
This commit is contained in:
parent
8dd6bf51b8
commit
aa0c7785b2
1 changed files with 4 additions and 3 deletions
|
@ -19,14 +19,13 @@ void setup()
|
||||||
|
|
||||||
Serial.println("...Starting Display");
|
Serial.println("...Starting Display");
|
||||||
HUB75_I2S_CFG mxconfig;
|
HUB75_I2S_CFG mxconfig;
|
||||||
mxconfig.double_buff = true; // Turn of double buffer
|
mxconfig.double_buff = true; // Turn of double buffer
|
||||||
mxconfig.clkphase = true;
|
mxconfig.clkphase = true;
|
||||||
|
|
||||||
// OK, now we can create our matrix object
|
// OK, now we can create our matrix object
|
||||||
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));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue