Data Logging with SainSmart 4.3" Inch TFT LCD Screen SD Card Slot

I am trying to use the SainSmart 4.3" Inch TFT LCD Screen SD Card Slot + TFT Shield For Arduino Due as a data logger for an analog sensor and some digital sensors, however I have not been able to get any example code to work. No matter the example SD code I try the SD card never passes the SD.begin(4) thus i get the failed message.

// setup SD-card
Serial.print("Initializing SD card...");
if (!SD.begin(4)) {
Serial.println(" failed!");

I am guessing that my hardware does not have the same pin out as the example code. (Although i dont know why it wouldn't)

On a side note i have gotten the screen to work perfectly, which i think means that the sd card is working inside of that code.

I guess I am looking for some example code that will work with my hardware or some advice on where to find more information. I am sure someone has used this exact setup for what i am doing.

You better post your code, a schematic, and some photos, quick, else the wrath of the Saruman descend upon ye.

There is not to much to show for a schematic since i am using a shield and the pictures of the setup are on the website. The code i am using is just some example code from the Arduino libraries.

Datalogger.ino (1.71 KB)

Oh, right. Missed the shield part. You're spared!

Are you using a properly formatted card (see sticky at top of forum)?

What SS pin is the TFT using? You can bet the SD isn't using that one.

Does the text on the front or back of your shield give you any clues about the SS pin for the SD?

Try the other Due SS pins: "Arduino Due has three exposed pins for the devices Slave Select (SS) lines (pins 4, 10, and 52)." from Arduino - Home

And, you could try SainSmart support: