Connect NodeMCU v3 to MicroSD

Hello everyone!

I've searched for the answer for a long time but I just can't find one understandable enough for a beginner like myself...

I have a NodeMCU v3:

I also have this Micro SD Adapter:

Could someone please explain to me the mapping between them?

SD.begin(X);

Aand also what do I write instead of X to make it begin?

Thank you very much for your time!

You haven't been looking hard enough
Interfacing sdcard with NodeMcu/ESP8266 - YouTube and there are others
I believe the only complication is in how you power Node MCU, as I believe the Catalex is a 5v module.

I guess powering is my problem then. Because I can't initialize SD card with this example too :c
Do you know how could I solve it?

Also, doesn't VIN pin give 5V?

VIN is just a pin above the regulator. IF you are feeding the regulator 5v, e.g. using a USB cable, then yes, that 5v is available at VIN. I have the same SD module but I have never used it. I understand it is 5v only and has an onboard 3.3v regulator. I assume the above arrangement is what is used in the video. Bearing in mind that ESP8266 is strictly a 3.3v device, if you are feeding it 3.3v by other means, don't expect 5v at VIN.

If your power is in fact kosher, I guess the next point is to ensure that the CS pin used really is the one called for in the code. It is typically pin 4 in Arduino and I believe that is D2 on NodeMCU.

Thanks guys, I figured many things out but I still can't make it work :c

I followed this to find what to plug where:

I got:

NodeMCU -> MicroSd Adapter
SCK         -> GPIO14 (D5)
MISO       -> GPIO12 (D6)
MOSI       -> GPIO13 (D7)
CS           -> GPIO15 (D8)
VCC         -> VU (USB power output - 5V?)
GND        -> GND

I don't have Voltmeter but when I plugged VU into the diode, it lighted like crazy. So I guess, 5V?

I also added this to my code:

const int chipSelect = 15;

Still, it just doesn't work.. What else might be the problem?

One problem might be that you need to use a pin layout that more closely approximates the device you have in your hand.