Hi guys,
For some esthetic reasons, I would like to show some picture from the SD card on my TFT display.
Everything works fin for the TFT display (which includes the SD card reader) to show the values of my measurements, to write and so on,
but I cannot manage to show picture from SD card.
I'm using the tinyFAT & UTFT_tinyFAT libraries.
My picture "1image48x60.raw" is on a SD card 2GB, on the root ( with other useless files)
Here is my code to test showing pictures ;
#include <tinyFAT.h> // used to acess the SD card
#include <UTFT_tinyFAT.h> // used to read .raw images from the SD card#include <UTFT.h>
#include <URTouch.h>
#include <EEPROM.h>UTFT myGLCD(ILI9486,38,39,40,41); //Parameters should be adjusted to your Display/Schield model CHECK DOCUMENTATION, TFT 480x320
UTFT_tinyFAT myFiles(&myGLCD); // start up an instance to read images from the SD card
//==== Defining Fonts
extern uint8_t SmallFont[];
extern uint8_t BigFont[];
extern uint8_t SevenSegNumFont[];void setup() {
// Initial setup
myGLCD.InitLCD();
myGLCD.clrScr();
myGLCD.fillScr(255,255,255);
file.initFAT();file.setSSpin(53);
drawscreen ();}
void drawscreen () {
myGLCD.setBackColor(255, 255, 255);
myGLCD.setColor(0,0,0); // Sets color to white
myGLCD.setFont(BigFont); // Sets font to big
myGLCD.print("Hydro", 380, 10); // Prints the string on the screenmyFiles.loadBitmap(220, 100, 48, 63,"1image48x63.raw");
}
void loop() {
}
A weird thing is that the display shows the myGLCD.print("Hydro", 380, 10) ONLY if I put as comment all the SD functions, with the SD function, my display does not write anything.
As always, it's hard to get beautiful
Thank you for any help !