Has anyone had any luck getting a Micro SD Card working on the Arduino Nano ESP32? I'm using pins as follows: SCK - D13, MISO - D12, MOSI - D11, CS - D10.
Wayne in NH
Has anyone had any luck getting a Micro SD Card working on the Arduino Nano ESP32? I'm using pins as follows: SCK - D13, MISO - D12, MOSI - D11, CS - D10.
Wayne in NH
Please post an image\picture or link for the 'Micro SD Card' adapter you are using.
Post your code also
Here is the code (based on ESP32 SD example):
/* Test Arduino Nano ESP32 with Sparkfun Micro SD Card
* Based on ESP32 SD_Test example
* Connect the SD card to the following pins:
*
* SD Card | ESP32 MY NANO ESP32
* D2 -
* D3 SS D3
* CMD MOSI D11
* VSS GND
* VDD 3.3V
* CLK SCK D13
* VSS GND
* D0 MISO D12
* D1 -
*/
#include "SD.h"
void setup()
{
Serial.begin(115200);
delay(3000);
if(!SD.begin(3)) {Serial.println("Card Mount Failed");return;}
uint8_t cardType = SD.cardType();
if(cardType == CARD_NONE){Serial.println("No SD card attached");return;}
Serial.print("SD Card Type: "); Serial.println(cardType);
}
void loop(){}type or paste code here
Oh, and it fails on the begin call...
Post a wiring diagram, showing power and ground connections. Hand drawn is preferred.
Your code shows SD.begin(3), but your description says CS is on D10. Try
SD.begin(D10).
If that fails, please show us the diagram as suggested.
Just for what it's worth: I had similar problems and whatever I did, could not get the SD-Card working until I connected the board to the Nano VUSB (5 V) and everything was fine. Even though the spec of the board says that it operates between 3.2 and 5 V.