0

I have an Adafruit MicroSD card breakout board and an Adafruit Feather HUZZAH with ESP8266 WiFi I wired that up according to this link's last picture.
The code I am using:

#include <SPI.h>
#include <SD.h>
...
const int chipSelect = 15;
...
Serial.print("Initializing SD card...");
pinMode(SS, OUTPUT);

if (!SD.begin(chipSelect)) {
     Serial.println("initialization failed!");
     return;
 }
Serial.println("initialization done.");
...

I always get the message "initialization failed", I also tried to format my SD card to be sure to have fat32 file system on it, but had no success with that.
What can I do to debug this error further?

TIA

1

From experience, I know the following

  • Using two SPI devices sometimes does not work, especially with fake SD breakout cards. Not sure about an Adafruit, but try to use only one SPI device at the same time (to check if it works better). For my project (initial setup), I had to use a SD logger extension board instead.
  • Sometimes it depends on the SD card which will work. Try to use older non SDHC/XDHC cards (smaller storage normally).
  • Use the most simple (and preferably example circuit) to test each component separately (thus your SD breakout card) before adding others (like the WIFI component). This rules out there is no problem with other components working at the same time.
  • what does this mean? ... tried to format my SD card – jsotola Dec 15 '17 at 1:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.