Help connecting arduino pro micro to micro SD module

Hello,
i am trying to conect a pro micro to a micro SD card module.
My connections are as follow:
uSD module ----- Pro micro
Cs pin ------------- Pin 10
SCKpin------------ Pin15
MOSI pin---------- Pin16
MISO pin---------- Pin14
VccPin ------------ RAW
GND---------------- GND

the connections i got from this link as y have the same board: https://cdn.sparkfun.com/assets/9/c/3/c/4/523a1765757b7f5c6e8b4567.png

My question is if there is a posibility of using this uSD module with this type of board, and if there is, please explain me why is not working for me.
the code i am trying out is the following. it always stucks on the if(!SD.begin(10)) part.
Thank you

#include <SD.h>
#include<SPI.h>

File myFile;

void setup()
{
Serial.begin(9600);
while(!Serial);
Serial.print("Iniciando SD ...");
if (!SD.begin(10)) {
Serial.println("No se pudo inicializar");
return;
}
Serial.println("inicializacion exitosa");

myFile = SD.open("archivo.txt");//abrimos el archivo
if (myFile) {
Serial.println("archivo.txt:");
while (myFile.available()) {
Serial.write(myFile.read());
}
myFile.close(); //cerramos el archivo
} else {
Serial.println("Error al abrir el archivo");
}
}

void loop()
{

}

what I am not seeing:

File myFile;
const int chipSelect = 10;          // SPI CS for SD
pinMode(chipSelect, OUTPUT);

in my experience, relying on the library to set pin 10 as chip select is iffy. do it yourself, you know it got done

Hello Geek Emeritus,

Thank you for your response. I tried that and it didnt work.

From another forum i saw that an option was to change the "pins_arduino.h" file in the arduino library so the MISO, MOSI, SCK and SS pin were assigned according to my board. While doing this, i couldn't save my changes as the file was not writable.

I found this file in the following directory in my computer:
Arduino/hardware/arduino/avr/variants/circuitplay32u4

the code in that file is as follows:

// Map SPI port to 'new' pins D14..D17
static const uint8_t SS   = 17;
static const uint8_t MOSI = 16;
static const uint8_t MISO = 14;
static const uint8_t SCK  = 15;

and i want to change it to:

// Map SPI port to 'new' pins D14..D17
static const uint8_t SS   = 10;
static const uint8_t MOSI = 16;
static const uint8_t MISO = 14;
static const uint8_t SCK  = 15;

But when trying to save, it does not allow me to. Is there anyway to modify libraries in succh a a way?

Thank you

is the file you want to modify set to read only?

Hi. Yes, i think it is only avaliable for reading.
I attach a photo of the pop up it appears when i am trying to save the changes.

Thank you

Hey miguelsl86,

I have the same problem as you and can't get my pro micro to detect the SD card. I have also tried modifying the file "pins_arduino.h" but still no difference.

If you want to give it a go, open notepad in administrator mode and then open the file from the file menu. This should allow you to edit the file.

I hope it works for you.

No, it didnt work for me.

Any other options, anybody? This is kind of urgent and the only option i am seeing is changing the board i am using

have you tried Cardinfo.ino from the examples?

Yes, the image attached is the return from the serial window.

I dont know what it means

There are a couple different microSD modules.

One was problematic. Don't remember which one.

.

I was able to get my Arduino to read from sd card. The problem was that I was connecting my Arduino to the breadboard using the row pin headers without soldering the pins to the Arduino board. Maybe that is the problem in your case?

how I connect modules: the module gets a single or double row header. the module end wires are soldered to that header. when the module is proven functional the header and wires are hot glued or RTVed. when you remove, troubleshoot, et cetera, you know one end is golden.

ps1234:
I was able to get my Arduino to read from sd card. The problem was that I was connecting my Arduino to the breadboard using the row pin headers without soldering the pins to the Arduino board. Maybe that is the problem in your case?

My pins are conected to my arduino board. maybe they are badly soldered, but i already tried to change the CS pin and use another one in the board and didnt work.

Can you tell me how did you connect your devices? A photo would help me a lot. Thank you.

Hi everybody.

I change my board to an Arduino Nano.

I think the problem that i have is either the uSD module or the uSD card. I have try 2 uSD cards uploading the CardInfo example from Arduino. Previous to this test i have formated the cards.

First image is the Serial monitor from using CardInfo with a uSD card formated as exFAT.

The second attachment is the Serial monitor obtained from a uSD card formated as FAT32

This leads me to think that maybe the uSD module is not ok, but i am using the same components as the ones in this video, and it still does not work

Any suggestions??

Thank you