Hi all.
I’m new to Arduino, so please forgive the stupid questions. I just purchased a Sparkfun MicroSD shield and an Arduino Leonardo. The Leonardo seems to be working fine, I’ve completed most of the basic tutorials without issue.
When I moved to the microSD shield, there are various issues. At first, following the quickstart guide, I included the Sparkfun SDFat library (SdFat.zip) in the library folder but I couldn’t get the example sketch (http://www.sparkfun.com/tutorial/microS … xample.pde) to compile. Further down the quickstart guide, they recommend using a different SDFat library (sdfatlib20120719.zip). Replacing the sparkfun SDFat library with the sdfatlib20120719 library allowed me to compile the example sketch. However, after uploading the sketch, I found no test.txt on the microSD card when I plugged it into my reader.
Trying the quickstart.pde example from the sdfatlib20120719, I was able to upload the sketch and communicate with the Leonardo board. But again, when I open the serial monitor and send “8” or “10” as the chip select pin number, I get:
SD initialization failed.
Do not reformat the card!
Is the card correctly inserted?
Is chipSelect set to the correct value?
Is there a wiring/soldering problem?
errorCode: 0x1, errorData: 0xff
Restarting
Enter the chip select pin number:
Any ideas on my coding errors? Is this a Leonardo-specific thing with the serial1 requirement? Do I have the right SDFat library? Any help or guidance is appreciated.