Thing Plus - ESP32 WROOM with a microSD Reader

Can anyone provide advice for hooking up a Thing Plus (ESP32 WROOM) to a microSD reader? From the many posts I’ve found on other forums, it seems like hooking up the microSD to an ESP32 device should be fairly straightforward, but I haven’t had any luck. Using the SD_Test.ino example that ships with the ESP32 manager, I’ve tried a number of pin configurations, including:

I’ve been declaring CS as 23 for most attempts but have tried varying that as well. I have used two different microSD modules:

Every attempt that I’ve made has ended with “Card Mount Failed”.](SparkFun Level Shifting microSD Breakout - DEV-13743 - SparkFun Electronics)](https://www.amazon.com/gp/product/B08CMLG4D6/ref=ppx_yo_dt_b_asin_title_o03_s01?ie=UTF8&psc=1)](esp-idf/examples/storage/sd_card at master · espressif/esp-idf · GitHub)](arduino-esp32/libraries/SD at master · espressif/arduino-esp32 · GitHub)](https://forum.sparkfun.com/viewtopic.php?f=97&t=49877&p=204323&hilit=thing+plus+gpio12#p204323)

If it helps, here is the code (simplified from the original example) that I’m trying to use:

#include "FS.h"
#include "SD.h"
#include "SPI.h"

void setup(){
  Serial.begin(115200);
  if(!SD.begin()){
    Serial.println("Card Mount Failed");
    return;
  }
  else {
    Serial.println("Success");
  }
}

void loop() {

}

In addition to trying the multiple SD modules listed in my last post, I’ve also tried multiple Thing Plus boards, so I don’t believe it’s an issue specific to the physical board.

And to clarify my previous post, I was declaring CS as 23 in situations where it didn’t conflict with the other pins. For the code example I’ve posted here, CS is pin 5.

Hello.

Unfortunately I don’t happen to have a ESP32 handy to test with due to working remotely but that guide you linked should work. Are you using the library that was included in the guide or another SD library?

You’re going to want to avoid the level shifting micro SD adapter we carry when using a 3.3 volt board, that will supply 5 volts on the I/O pins and the the ESP32 doesn’t have 5 volt tolerant I/O. (5 volts could kill a pin on the ESP32 module.) It’s possible you might have blown those pins so if you happen to have a spare ESP32 WROOM handy, give that a try with a no level shifting adapter.

Your generic adapter will probably work and our [microSD Transflash Breakout will work OK. A quick and dirty way of making an adapter is to take one of those microSD to SD adapters that everyone seems to have a dozen of and carefully solder some header pins to it. It’s a bit redneck but will work in a pinch. Just be careful not to melt the plastic on the adapter too much while soldering!

](https://www.sparkfun.com/products/544)