Arduino TFT Screen not consistently reading files from SD (Arduino Uno)

I recently purchased an Arduino LCD TFT Screen http://arduino.cc/en/Main/GTFT (from Robot Mesh), and I have been having trouble getting it to read from the SD card slot. Strangely enough it works some times, and other times it fails to find the SD card or to find the images on it. When messing around with the example files for loading images (Examples > TFT > Arduino > TFTBitmapLogo) there doesn't seem to be a problem finding and loaded the image every time I reset the arduino. However, running my own project with the same image does not seem to be consistent. Below is my code:

#include <SPI.h>
#include <SD.h>
#include <TFT.h>

#define sd 4
#define lcd 10
#define dc 9
#define rst 8

TFT tfts = TFT(10, 9, 8);

PImage logo;

void setup(){
  tfts.begin();
  Serial.begin(9600);
  
  while(!Serial){
    tfts.background(10, 151, 156); 
  }
  
  tfts.background(0, 0, 0);
  tfts.stroke(0, 255, 0);
  Serial.println("Initializing...");
  tfts.print("SD CARD STATUS: ");
  
  if(!SD.begin(sd)){
    tfts.stroke(255, 0, 0);
    tfts.println("Failed!");
    tfts.println("Reboot with SD");
    Serial.println("Missing SD card/ SD setup could be incorrect");
    return;
  }
  Serial.println("Initialization success");
  tfts.println("OK!");
  
  tfts.begin();
  /*for(int i = 0; i < 255; i += 51){
     screen.background(i, i, i);
  }*/
  
  logo = tfts.loadImage("al.bmp");
  if(!logo.isValid()){ 
     tfts.background(0, 0, 0);
     tfts.stroke(255, 0, 0);
     tfts.text("x", (tfts.width()/2) - 1, (tfts.height()/2) - 1);
     Serial.println("SD card may lack proper files, will continue");
     delay(3000);
     return;
  }
  tfts.background(255, 255, 255);
  tfts.image(logo, tfts.width()/2 - logo.width()/2, tfts.height()/2 - logo.height()/2); 
  Serial.println("Diagnostic success");
  delay(3000);
  tfts.begin();
}


PImage background;

void loop(){
   background = tfts.loadImage("b.png");
   if(!background.isValid()){
     tfts.background(0, 0, 0);
     tfts.stroke(255, 0, 0);
     tfts.println("Missing files!");
     Serial.println("SD card missing proper files!");
   }
   tfts.image(background, 0, 0);
}

Thank you in advance for any help provided!

Someone must have had this problem before?

Hey zu01,
I have nearly the same problem, but in my case it has never worked. (Either the screen remained white, or it got gray stripes.)I tried it with my Arduino UNO (only the examples). For testing I connected all pins from the screen to the Arduino - no results. :disappointed_relieved: To connect it properly, I used http://arduino.cc/en/Guide/TFTtoBoards.
Either the Serial Monitor reads SD card failed or permanent loading image.
Any tips, hints or something else?
PS: I got my Arduino stuff for Christmas, so I am a complete beginner. And I am german, so please excuse possible mistakes.

Look for pin conflicts between the SD and the display - particularly in the chip select line, if they're both using SPI.

Did you see the part in the instructions where it says the screen is upside down in the pix? Might be the wiring is back asswards....

JimboZA:
Did you see the part in the instructions where it says the screen is upside down in the pix? Might be the wiring is back asswards....

Yes, I made sure that everything was in order with the wiring, at this point i'm assuming it's just something with my code. I seem to be able to use the example program to load an image w/o fail, along with some of the SD examples, with no mishaps time after time, but my program still fails for the most part.

I am also sure that the connections are correct.
The confusion between GND and +5 V would certainly have bad consequences.
Does anyone know what to do when the monitor displays "Initializing SD card...failed!" I even tried it with another card.
Yours sincerely