I just wanted to preface this post by saying that I’m quite new to the particle ecosystem. Anyway, I’m attempting to read from and write to an SD card from the photon using the sd-card-library-photon-compat library. I’m using the example in the library folder titled Spark-ReadWrite.ino*. This is how i’ve wired the pins on the photon to the pins on the card module:
I’m powering the photon via the micro usb cable connected to my laptop. The Vin pin on the photon is connected to the 5V pin on the card module(I’m powering the card module using the output voltage of the photon at Vin).
This is a picture of the card module I’m using:
and this is the sd card I’m using:
Anyway, when I try and flash the Spark-ReadWrite.ino example to my photon, I get the following output to serial:
Initializing SD card…Error: Read
Error: SdVolume::init() Cache for read
Error: SdVolume::init() Cache for read2
I’m not sure why there’s an error reading from the SD card, and any help would be appreciated.
*Please note that I had to comment out the line while (!Serial.available());, since it was causing the photon to go idle when I would flash the binary file(I suspect it was causing an infinite loop, but I’m not sure why).