ShowBmp on tft screen

Hi Good Evening
i am running on Arduino mega with a Elegoo 2.8 with sd card inch screen i have this sketch "test" that i have been working on
i am trying to show a bmp for 3 seconds before the main sketch starts the only way i found to be able to show images on screen was using showBMP_not_Uno but i cant change it to display one image for 3 seconds it just loops and how would i approach adding this on my test sketch

test.ino (14.4 KB)

showBMP_not_Uno.ino (9.66 KB)

logo.jpg

In setup()

    ...
    bool good = SD.begin(SD_CS);
    if (!good) {
        Serial.print(F("cannot start SD"));
        while (1);
    }
    showBMP("logo.bmp", 0, 0);
    delay(3000);
}


void loop()
{
    // replace with your application code
}

There are programs on your PC to convert logo.jpg tp logo.bmp

Your logo is monochrome. You could save it as a monochrome bitmap. You could put this in an array in PROGMEM. And show on your screen with Adafruit_GFX method:

    drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
      int16_t w, int16_t h, uint16_t color, uint16_t bg),

David.

i tried your code im getting this error

Capture.JPG

did you copy the showBMP() function ?

Life is much easier with your logo as an array in PROGMEM.

I provide MCUFRIEND_kbv examples that show this.

I don't know whether Elegoo have copies my examples.

Oh, please copy-paste text messages. It is annoying to open a JPG. And the reader can not copy-paste text from a JPG.

David.

with the draw function i have tried with no luck can you show an example perhaps
i really dont know what im doing wrong

Here is an example that shows a monochrome bitmap from array in PROGMEM. for 3 seconds.

Then displays the BMP format file from SD card for 3 seconds.

The BMP file looks much nicer but you only want to show it for a short time.

David.

ipkiller86_logo.zip (34.2 KB)