Beginner Question with SD Card Interface

Beginner here, pretty much completely new to all things Arduino.

Anyway, I'm using the sparkfun microSD card shield (SparkFun microSD Shield - DEV-12761 - SparkFun Electronics) and attempting to interface with an Arduino Zero, just as a simple data logger as a part of a project. I get a card initialization error every time I attempt to open it.

Are there any issues using the SD card library with an Arduino Zero? The code I have has the chip select set to 8, as I believe it is supposed to be.

I'm using this SD card: http://www.amazon.com/Samsung-Class-Adapter-MB-MP16DA-AM/dp/B00IVPU7KE, not sure if that's the issue here.

Thanks for any help, sorry that I can't provide any more information; like I said, completely new to this whole thing and don't have a great understanding of SPI and such.

Code:

//USES SD CARD LIBRARY TO INITALIZE SD CARD, Serial lines used for debugging purposes
void initializeSD()
{
  Serial.print("Initializing SD card...");
  // see if the card is present and can be initialized:
  if (!SD.begin(8)) {
    Serial.println("Card failed, or not present");
    // don't do anything more:
    return;
  }
  Serial.println("card initialized.");  
}

Does your code compile properly?

Has your card been properly formatted? There is a sticky about that on this forum.

That board apparently does use pin 8 for CS - contrary to what practically everybody else uses.

The code compiles completely fine, I have not yet formatted the SD card since it came straight out of the box. Could that be the issue?

The code compiles completely fine, I have not yet formatted the SD card since it came straight out of the box. Could that be the issue?

Yes, the card needs to be formatted. See the first sticky post in the Storage section as Nick indicates.

The Zero only connects to SPI via the ICSP header.

The SparkFun shield connects to both the ICSP header and the Uno SPI pins 11, 12, 13.

You must install an ICSP header and avoid use of pins 11, 12, 13 or cut traces on the shield.