Particle SDFat Library


Is there an SD library which works with a Bluz DK?

The SDFat library port for Particle does not compile (see attached).

Thanks for any help.


I am not sure if there is one available in the IDE. Those libraries are all 3rd party supplied, so it would be up to the author to support bluz or not.

I am sure you could fork their library and make it work for bluz, or perhaps contact the author to find out.


Thanks @eric.

Do you know of any other SD library that may work?


I haven’t tried one, unfortunately. Most of the SD libraries use SPI underneath, I believe, so there should be one out there that could work, perhaps with slight modification. I can try one soon, but I don’t have a shield so it would be more just to see if they compile. Let me get back to you in a day or two


Sounds good, thank you @eric.

The SDFat library is the most popular. I used it with my Photon successfully with an SPI board but on the Bluz it gives compilation errors die to Wprogram.h.

When that line is replaced by application.h or Arduino.h, other errors appear.

I am not a good C programmer so these errors stump me :-).


Hello @eric,

Any luck in getting the library to work?

I tried three libraries (SDFat, sd-card-library-photon-compat, and sd-card-library. The most popular one (SDFat) gives a couple of errors as shown above.

However, all THREE libraries do not like the following statement below with the error (‘SS’ was not declared in this scope):

// This needs to be called to set up the connection to the SD card
// before other methods are used.
boolean begin(uint8_t csPin = SS); // HARDWARE SPI