Struggling with SD card read on Arduino I'm attempting to read data from my SD card, but I have strange behavior and can't figure out why this is happening.

I'm using CardInfo from the Arduino example and am trying to read the data from my SD card.

I'm faced with two different problems, but maybe they can be related:

1:  If I format my SD card from my Mac (FAT32), if my card is still empty, the program can read my card and output the right information. But if I add data from my Mac to the SD Card, card.init never initialise, and my data are never read (because of the hidden files). If I remove those hidden files, but let only the expected files be, the program never find them, like if my card was still empty. I don't know how to handle this.

2: From my Arduino, if I feed the card from the 3.3&nbsp;V output, I get the


  Card type: SD2 Could not find FAT16/FAT32 partition. Make sure you've
  formatted the card


It only works on 5&nbsp;V (but the card type becomes SDHC). So I've tried to feed my card with another 3.3&nbsp;V/5&nbsp;V supply (my Arduino is grounded to this supply as well), but this is only working on 5&nbsp;V. On 3.3&nbsp;V my card isn't detected. My wires to the SD card are about 15 inch. I don't know if it can affect it drastically, but this is the only 'weird' thing about this circuit. By the way I naively think my 3.3&nbsp;V supply should handle that. 

Here are my materials:
- Arduino Duemilanove


For the SPI wiring I'm using pin 10 for SS.
Using the Cardinfo from the Arduino library.
I recommend you get a MicroSD card breakout board from that link, or something similar. That's around $US 15.



That includes the logic level converters. That particular board is for the **micro* SD card, but similar converters could no doubt be found for an SD card. Or use that one with a micro-SD card and just get an SD converter for when you plug it into the Mac.

I personally have used the SDfat library without any problems. However since he started rewriting it, I did have some issues. I have a backup of an earlier version which might be useful if the live library doesn't work for you.

You might be best off not formatting the card, but leave it as factory formatted. That will probably be compatible with the Mac, and also the SDfat library.