Arduino/Genuino 101 and SD card module

In this article I will explain how to interface an SD card module to Arduino 101. The module which I used is a CATALEX MicroSD Adapter (v1.0) and communicates via SPI communication protocol. The connection is the same as for Arduino Uno:

Catalex Micro SD Adapter
Catalex Micro SD Adapter
    • GND: ground (0V)
    • VCC: power supply (5V)
    • MISO (Master Input Slave Output): Arduino pin 12
    • MOSI (Master Output Slave Input): Arduino pin 11
    • SCK (Master Serial Clock): Arduino pin 13
  • CS (Slave Select): you can connect this pin to any Arduino digital output, and then write that pin number inside the function call SD.begin(). I this example, I connected it to Arduino pin 9, and then write SD.begin(9).

The following sample code was available on Arduino official website. I just had to modify the CS pin from 4 to 9, since I connected Arduino pin 9 to the slave CS pin. In order to communicate with the module, it is necessary to include SPI communication( "SPI.h") and SD module ("SD.h" ) libraries.

The code is compiled and uploaded on Arduino 101. If everything goes well, a "SUCCESS" message appears. After that, about 5 seconds are needed to start the software. Arduino 101 has an Inter Curie architecture instead of the Atmel microcontroller architecture, which was present on the previous Arduino Uno: the capability of Intel Curie architecture is higher, but the it requires more time for the system to wake up after a reset.

SD_card_codeAfter finishing uploading the software, click on "Tools" and "Serial Monitor" and if everything is correct, you should see the following screen.

SD_card_code2In case you visualize an error, such as "error opening...", make sure that the SD card has been inserted in the module, and that the wire connections are right.

 

Author: Davide Cavaliere

I am an Italian Electrical Engineer graduated at Politecnico di Milano. My interests are motorcycles and cars, electronics, programming, Internet of Things, and Japanese culture.

1 thought on “Arduino/Genuino 101 and SD card module”

  1. thats helpful.. but im trying wemos D1 R2 board...
    would u help me with the wire sketch for it board to it catalex, please?

Leave a Reply

Your email address will not be published. Required fields are marked *