Skip to content

Commit

Permalink
Demonstrate how to draw once and stop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger-random committed May 16, 2021
1 parent 9a009ab commit 3f52141
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions examples/RGB332_Colors/RGB332_Colors.ino
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,11 @@ SOFTWARE.
ESP_8_BIT_composite videoOut(true /* = NTSC */);

void setup() {
videoOut.begin();
}

void loop() {
uint8_t redChannel;
uint8_t** frameBufferLines = videoOut.getFrameBufferLines();
uint8_t** frameBufferLines;

videoOut.waitForFrame();
videoOut.begin();
frameBufferLines = videoOut.getFrameBufferLines();

// Draw all the colors available in our RGB332 palette
for (int y = 0; y < 240; y++)
Expand All @@ -60,4 +57,9 @@ void loop() {
frameBufferLines[y][x] = redChannel | x >> 3;
}
}

videoOut.waitForFrame();
}

void loop() {
}

0 comments on commit 3f52141

Please sign in to comment.