I have Adafruit RP2040 Feather with DVI. I am using Arduino IDE and Adafruit GFX library. I have short program that displays a 8-bit bitmap. I would like to display some text and the bitmap at the same time. I cannot figure out how. The program below, when executing, displays bitmap then goes blank for 2 secs and then the bitmap again. How come the text is not being displayed?
#include <PicoDVI.h>
#include "sprites.h" // Graphics data
DVIGFX8 display(DVI_RES_320x240p60, true, adafruit_feather_dvi_cfg);
void setup() { // Runs once on startup
if (!display.begin()) { // Blink LED if insufficient RAM
pinMode(LED_BUILTIN, OUTPUT);
for (;;) digitalWrite(LED_BUILTIN, (millis() / 500) & 1);
}
// Initialize color palette from table in sprites.h. Rather than
// calling setColor() for each one, we can just dump it directly...
memcpy(display.getPalette(), palette, sizeof palette);
}
void loop() {
display.fillScreen(20); // Clear back framebuffer,
display.setFont(); // Use default font
display.setCursor(0, 10); // Initial cursor position
display.setTextSize(1); // Default size
display.println(F("TEXT 1"));
delay(2000);
display.drawGrayscaleBitmap(0, display.height() - 125, BINGO, 125, 125);
display.swap(); // bitmap is visible after swap
delay(2000);
}
I've tried various combinations of display.swap(). I can either display text or bitmap, but not both at the same time. What am I doing wrong?