Hello everyone, hope you might forgive me while taking up a well discussed issue - "using SD cards on Arduino is sometimes less than straightforward".
I have probably read every single post on the web, and while taking several actions in the meantime, I ended up spending almost two months uselessly. Long introduction to beg you being easy on me, please...
I'll reward with full gratitude from the Verona, the city of Romeo & Juliet for those who heard of it..
For the records, I found these two post quite interesting and close to the topic, nevertheless not applicable to my case:
http://forum.arduino.cc/index.php?PHPSESSID=cb2ocm9h166jhq2fi366rgfdf7&topic=218098.0
http://forum.arduino.cc/index.php?topic=144813.0
MY REAL SIMPLE SETUP: a bare Arduino UNO, no frills, no further shields except SD card module (this --> http://www.lctech-inc.com/Hardware/Detail.aspx?id=0c3b6f7a-d101-4a60-8b56-3abfb7fd818d).
CS pin is 4.
REAL SIMPLE MATTER: it never works, not even the example code.
Cards on the bench are two SanDisk (capacity of 128MB used, formatted and fully working and another 2GB absolutely new and intact) and one Maxell 2GB (used and commonly used in my digital camera. i.e. "working").
Code is "anything" in the example that does some sort of writing. Reading is generally fine.
Example SdInfo is working fine. ReadWriteSdFat is not.
My own code used to work for a while until it decided, spontaneously, to quit. Absolutely no chance to attempt a StressTest (as the example provided) neither with the brand new card.
SdFormatter works, but creates an unformatted disk (as reported by ReadWriteSdFat), thus unusable.
Sometimes ReadWriteSdFat makes some written 0Bytes file while returning:
error: opening test.txt for write failed
SD errorCode: 0X13,0X0
Question about pins. Every example reports different pins according to which shield one's using. Not using any shield whatsoever I wonder whether an arbitrary PIN can be chosen. Again, my preferred number is "4" but I tried with other numbers with no luck.
I thought hooking a card to Arduino was way more straightforward but apparently is seems out of my reach.
Any recommendation before throwing everything off the window?
[I swear: my next project is to plant a tree...]