I am trying to run the Example/SD/listfiles sketch on my Uno/Ethernet Shield combo and it keeps returning:
Initializing SD card...initialization failed!
I formatted the 2G SD card as FAT 32 and added a two files and a directory to test it.
I have nothing else hooked up to the Arduino and it is connected to the PC via USB.
Here is the code - should be from the default sketch:
Serial.print("Initializing SD card...");
// On the Ethernet Shield, CS is pin 4. It's set as an output by default.
// Note that even if it's not used as the CS pin, the hardware SS pin
// (10 on most Arduino boards, 53 on the Mega) must be left as an output
// or the SD library functions will not work.
pinMode(10, OUTPUT);
if (!SD.begin(10)) {
Serial.println("initialization failed!");
return;
}
Thanks!