Problem using sd-slot on gps-shield

Hello
I'm trying to save some data from the gps using the sd-slot on this card:

http://www.gadgetcat.com/product/arduino-gps-shield-with-sd-interface/

The problem is that no matter what I do I cannot get any communication at all with the sd-slot. My guess is that the sd-slot is broken. But I don't know how to test that really so my secondary solution is as follows. Buy a second Arduino Uno and attach the below sd-shield:

And now to my question.

Can I connect my "gps-arduino" to my "sd-arduino" and send a complete nmea string or is that to much data per second so to speak?

What pin are you using for the SD card SPI slave select in SD.begin()? Are you aware it is D10?

Posting the code you are trying may help.

I used the code from the documentation I found on the internet and it uses pin 10 I believe..?

#include <SD.h>
const int chipSelect = 10;
void setup()
{
  Serial.begin(9600);
  
  pinMode(10, OUTPUT);
  if (!SD.begin(chipSelect)) {
   Serial.print(F("Could not initialize sd-card!"));
    return;
  }
 
}

void loop()
{
  // make a string for assembling the data to log:
  char index = 0;
  char temp = 0;
  String dataString = "";
  // open the file. note that only one file can be open at a time,
  // so you have to close this one before opening another.
  /*
    while(Serial.available())
    {
      File dataFile = SD.open("datalog.txt", FILE_WRITE);
      if(dataFile)
      {
        temp = Serial.read();
        dataString += String(temp);
        dataFile.print(dataString);
        dataString = "";
        dataFile.close();
      }
    }
  */  
File dataFile = SD.open("datalog.txt", FILE_WRITE);
 if(dataFile)
 {
   while(Serial.available())
   {
     temp = Serial.read();
     dataString += String(temp);
     index++;
     if(index>200)
       break;
   }
   dataFile.print(dataString);
   dataFile.close();
 }
}

How do you know it is not doing what it is programmed to do? Is it displaying "Could not initialize sd-card!" on the serial monitor?

Yes it is displaying "Could not initialize sd-card" on the serial monitor. I'm sorry for not clearing that up from the beginning sir.

Have you formatted the SD with fat16lib's format utility? I would search for it, but the forum search is still broken and it is resorting to Google, which doesn't return very accurate results.

Hmm good suggestion sir. I will try it right away! :slight_smile:

Hmm. So I tried your(SurferTim) suggestion and formatted the sdcard. The result were as following.

Below card still doesn't initialize the card
http://www.gadgetcat.com/product/arduino-gps-shield-with-sd-interface/

Below card initializes the card and seems to work properly.

So that probably means that the first card is broken in some way I guess?

You are using an Uno for both tests, is that right?

That's absolutely right sir.

I have an opposite problem SD card worked but not gps, there is no data from the gps. x-ctu detected the usb port but unable to communicate with the modem.

Anyone have the same problem?

Thanks!