XIAO ESP32S3 and SD module

Hi, community!
Trying to connect SD card module to XIAO ESP32S3

SD card module: https://aliexpress.ru/item/32673631024.html

I connect all wires as stated in the article Portable GPS Tracker with Arduino | by Joshua Hrisko | Medium

But it doesn’t work for me. In serial monitor i see only ‘Waiting SD’. But if i change CS wire to D3, for example, i’ve got ‘SD card not found’.

Also i tried this code on XIAO SAMD21 and it works.
Maybe there are some peculiarities of working with the XIAO ESP32S3 board?

Code is simple

void setup() { 
  Serial.println("Waiting SD"); 
  if (!SD.begin(6)) { 
    oled.println("SD card not found"); 
    while (true) 
  Serial.println("SD ready");

Hi there & welcome,
Take a look at the wiki for the round display , Gif viewer example, That has some solid SD card action for ESP32S3. What Libraries you using
GL :slight_smile: PJ

1 Like

Thank you. Problem was in DX enum
For SAMD21 is D3 = 3, but for ESP32S3 is D3 = 4

Now my SD.begin(D3) is pass, but got an error at SD.open(fileName, FILE_WRITE, true);

Yeah! Find soolution in ESP32 & SD-Card - Can't open/create File - #4 by Deva_Rishi - Storage - Arduino Forum

Leading / is required =)

Thank you PJ_Glasso