Hello,
I have almost all wanted working, I can read the .bmp images from SD card and I can see them on TFT screen from .ino sketch file but I'm facing problem getting an .bmp from splashscreen.cpp ...
here is the code;
// START screen settings /
#ifndef SPLASHSCREEN_cpp
#define SPLASHSCREEN_cpp
#include "SplashScreen.h"
#include "BmpSD.h"
SplashScreen::SplashScreen(int xLoc, int yLoc, ILI9341_t3 *ptr_tft,
Adafruit_STMPE610 *ptr_ctp) {
this->xLoc = xLoc;
this->yLoc = yLoc;
this->ptr_tft = ptr_tft;
this->ptr_ctp = ptr_ctp;
}
void SplashScreen::drawMe(void){
ptr_tft->fillScreen(ILI9341_BLUE);
int16_t color0 = ptr_tft->color565( 125, 204, 204); //?? color /
int16_t color1 = ptr_tft->color565( 125, 204, 204); //Logo Color /
ptr_tft->setTextColor(ILI9341_YELLOW); // Mike Oven text//
ptr_tft->setTextSize(3);
ptr_tft->setCursor(15, 15);
ptr_tft->println(F("Mike's Screen"));
ptr_tft->setTextSize(3);
ptr_tft->setCursor(6, 48);
ptr_tft->println(F("START"));
// Logo to be replaced by .bmp image from SDcard
// for (int i = 0; i < 188; i+=1){
// int16_t color; // select the color according to the face // dark grey
// color=color1;
// for (int j = 0; j < 23; j+=1){
// for (int k=0; k<8; k+=1){
// if ((MM[i*23+j]&(1<<k))>0){
// ptr_tft->drawPixel((j+1)*8-k+26, i+yLoc, color);
// };//if
// };//for
// };//for
// }//for
bmpDraw("Logo.bmp", 10, 0, *ptr_tft); // logo image .bmp //
ptr_tft->setTextColor(ILI9341_YELLOW);
ptr_tft->setTextSize(2);
ptr_tft->setCursor(xLoc+4, yLoc+200);
ptr_tft->println(F("START==>>>"));
ptr_tft->setTextColor(ILI9341_GREEN);
ptr_tft->setTextSize(2);
ptr_tft->setCursor(xLoc+13, yLoc+220);
ptr_tft->println(F("TO SETTINGS"));
while (!ptr_ctp->touched());
}
#endif // SPLASHSCREEN_cpp
Could you please advice me what I doing wrong..
Thanks,
Mike