diff options
| author | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2021-08-19 20:44:15 +0100 |
|---|---|---|
| committer | mrfaptastic <12006953+mrfaptastic@users.noreply.github.com> | 2021-08-19 20:44:15 +0100 |
| commit | c1699bb8fc2f98d94f1baf23b698227aca9b5d06 (patch) | |
| tree | 273988bc80f7aae75a3d51bbaf496704ee2bf175 | |
| parent | a2d3efc0f393a6fc569d465aab76aad9e51a874c (diff) | |
| parent | f523f1371ad64bd7ab52cfbaee348c07c767d0ae (diff) | |
Merge branch 'master' of https://github.com/mrfaptastic/ESP32-HUB75-MatrixPanel-I2S-DMA
| -rw-r--r-- | examples/README.md | 2 | ||||
| -rw-r--r-- | examples/SmoothDoubleBuffer/SmoothDoubleBuffer.ino | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/examples/README.md b/examples/README.md index 84f3823..0f11b0c 100644 --- a/examples/README.md +++ b/examples/README.md @@ -8,6 +8,6 @@ |BitmapIcons |Simple example of how to display a bitmap image to the display. | |ChainedPanels |Popular example on how to use the 'VirtualDisplay' class to chain multiple LED Matrix Panels to form a much bigger display! Refer to the README within this example's folder! | |ChainedPanelsAuroraDemo |As above, but showing a large trippy plasma animation. | -|DoubleBufferSwap |Advanced example of using a back-buffer (double buffering). Not useful for 99% of use cases. | +|Smooth Double Buffer |Example of using a back-buffer (double buffering). Not useful in 99.9% of use-cases of this library. Uses double the SRAM as well. | |P6_32x16_1_4_ScanPanel |An advanced example ('hack') on how to use this library on 32w x 16h 1/4 Scan LED Matrix Panel. | |PIO_TestPatterns |Non-Arduino example of how to display basic shapes. | diff --git a/examples/SmoothDoubleBuffer/SmoothDoubleBuffer.ino b/examples/SmoothDoubleBuffer/SmoothDoubleBuffer.ino index 80bd6bf..6e40c36 100644 --- a/examples/SmoothDoubleBuffer/SmoothDoubleBuffer.ino +++ b/examples/SmoothDoubleBuffer/SmoothDoubleBuffer.ino @@ -29,7 +29,12 @@ void setup() start_x = display->width(); } - +/* + This example draws a red square on one buffer only, and a green square on another buffer only. + It then flips between buffers as fast as possible whilst moving them as well - to give the impression they're both on screen at the same time! + + The only thing that's painted to both buffers is a blue square. + */ const int square_size = 16; void loop() { @@ -63,4 +68,4 @@ void loop() if (start_x < (-1*square_size)) start_x = display->width()+square_size; -}
\ No newline at end of file +} |
