Afficher image .raw


//#include <tinyFAT.h>
//#include <UTFT.h>
#include <UTFT_tinyFAT.h>
#include <SPI.h>
#include <SD.h>

//////////////////////////////////////////////////////////////////////
//sd 
// Chip select may be constant or RAM variable.
const uint8_t SD_CS_PIN = 53;
//
// Pin numbers in templates must be constants.
const uint8_t SOFT_MISO_PIN = 35;
const uint8_t SOFT_MOSI_PIN = 37;
const uint8_t SOFT_SCK_PIN = 36;

//ecran tft
 //model,cs,cd/rs,wr,rd,reset// rs option
UTFT    myGLCD(ITDB32S,38,39,40,41);
// ecran tactil
//URTouch  myTouch( 6, 5, 4, 3, 2);

UTFT_tinyFAT myFiles(&myGLCD);
//UTFT myFiles(&myGLCD);
// Declare which fonts we will be using
extern uint8_t BigFont[];
extern uint8_t SmallFont[];


void setup()
{

file.initFAT();
  Serial.begin(115200);

  Serial.print("Initializing SD card...");

  // see if the card is present and can be initialized:
  if (!SD.begin(53)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
    while (1);
  }
  Serial.println("card initialized.");
delay(2000);
///////////////////////////////
  int xscreen = 0; // largeur ecrant
 int yscreen = 0;
 
  myGLCD.InitLCD (LANDSCAPE);//(PORTRAIT);//(LANDSCAPE);//
  myGLCD.clrScr();

 // myTouch.InitTouch();
 // myTouch.setPrecision(PREC_MEDIUM);

  xscreen = myGLCD.getDisplayXSize();
  yscreen = myGLCD.getDisplayYSize();

 
  myGLCD.clrScr();
delay(2000);
 myGLCD.setFont(SmallFont);//(BigFont);
myGLCD.setColor(255,255,255);

}

void loop()
{
 myGLCD.clrScr();
myGLCD.drawBitmap(0,0,"tiger.raw",240,320);
myGLCD.print("tiger.raw",10,20);
delay(5000);

 myGLCD.clrScr();
 myFiles.loadBitmap(0, 0, 320, 240, "test.raw");
 myGLCD.print("tiger.raw",10,20);
delay(5000);


}

drawBitmap , m'affiche rien que de la neige de couleur et meme pas en 320,240
et le loadBitmap ne m'affiche rien .