BDub & billprozac, after reviewing the examples I noticed that they are somewhat helter-skelter in how they use the library. A call to card.init() correctly configures the library for hardware or software SPI and sets the pinMode for all pins. A call to SD.begin() combines the card, volume and root initialization calls into one but with a single true/false return as an error. So you call begin() if you just want a go/no-go or each separate functions if you want more details. The examples make use of both approaches. One thing missing from the examples is code to demonstrate a software SPI configuration.
In reviewing the code I also found that the specified chipselect pin for the hardware SPI mode is NOT configured for OUTPUT whereas it is for the software SPI mode. As soon as I get a chance, I will make the changes to the init() code and the examples. BDub, I will do a pull request once Iām done.
Hello all. I just wanted to thank @BDub and all others for their excellent work on this nice addition to the Spark Core ecosystemā¦
Using the pictures I easily converted a Micro SD adapter with some heading pins into a working MicroSD reader for the core. I used 90 degrees bend header pins to allow a flat card on my breadboard and printed pin-out labels to avoid problems. Luckily my core didnāt die after a stupid shortcut by a misplaced jumper wire, despite those labelsā¦
Using the online IDE I successfully ran all the examples with a 4GB card. The card was successfully identified as a SDHC card and the speed test showed reading speeds around 288 kB/s and writing around 145 kB/s. The read/write example showed me how to include file reading into my webserver project, which gives me much better flexibility.
Next TODO on my list is to enable long filenames. I presume a PHP/MySQL library with .htaccess url rewriting is a bit too much to ask for the coreā¦