Testing the SD Card Slot

Now we want to test the SD card slot, since it can be used in all the subsequent gadgets in this book.

Parts

  1. Arduino
  2. Ethernet shield
  3. microSD card

Assembly

Step 1 Insert the microSD card into the holder.

Step 2 Load the sketch “SD card read/write,” which you can find in the IDE under File | Examples |SD |ReadWrite or on EMWA GitHub repository | chapter-6 | SDCardReadWrite.

Step 3 If the Arduino successfully reads “testing 1, 2, 3” from the SD card and displays it on the serial output, the SD card slot works.

If instead, the serial output displays the words “error opening test.txt,” there is an error somewhere and you’ll need to do some troubleshooting.

Get Environmental Monitoring with Arduino now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.