This library was made because I wanted to learn more about SPI communication and filesystems. I also could not find a ready-made library that did what I wanted it to do.
The library supports FAT16 formatted SD cards up to 2GB in size. 4GB FAT16 formatted SD cards does not work. Long filenames are not supported. Keep your filenames compliant with the old 8.3 standard.
The SD card should be connected to the SPI-pins on your Arduino. Pin connections are available in the documentation in the download.
tinyFAT.zip (Filesize is 368.14 KiB. Downloaded 42824 times)
Demos are included to demonstrate most of the functions.
For a full list of changes please see the file version.txt included in the download.
Nice to know:
Do not reset your Arduino while the SD card is being accessed. Doing so will usually result in the SD card locking up. If it should happen to you it is resolved by removing all power to the Arduino, waiting a few seconds, and the reconnecting the power.
If you want to use a non-standard SPI SS pin you must set the pin with file.setSSpin() before calling file.initFAT().