Using the MicroSD Adapter TinyShield Tutorial

by TinyCircuits Staff February 19, 2016

Using the MicroSD Adapter TinyShield Tutorial

Overview

The TinyShield microSD Adapter board lets you add a huge amount (many GBs) of storage to your projects by using a microSD card. This Adapter works directly with the built in Arduino SD Card libraries that are already installed in the Arduino IDE.


           

Powering the System

A microSD card consumes a large amount of power when it is being accessed(100-200mA), so your TinyDuino system needs to have a power supply or battery that is large enough to power this. The coin cell option on the TinyDuino is not sufficient to power this.

The microSD Adapter TinyShield includes a local voltage regulator and level shifters, so your TinyDuino system can operate from 3-5 Volts safely.


Formatting the microSD Card

The Arduino SD Card Library supports cards formatted with FAT16 and FAT32 filesystems. For best results, we recommend formatting your microSD card before use by using the official SD card formatting utility as supplied by the SD Card Association.

Download it here.


Testing it out

Plug in your TinyDuino to your computer with the USB TinyShield and the microSD Adapter TinyShield attached, and insert the microSD card into the connector. Start up the Arduino IDE, and go to the SD CardInfo sketch.

Before you run the sketch, we need to change the Chip Select to match what is used on the TinyShield, which is pin 10.

Note: Any sketch that uses the microSD card shield will need to have this set to 10 before you run them.

Now click the Upload button on the Arduino IDE to build the sketch and upload it to the TinyDuino. Open up the Serial Monitor, type something in and press "Send". You should receive some data back on the card and a list of files:

If this is having a problem recognizing the card, check that you set the ChipSelect value to 10. Also try to format your card using the official SD Card Utility.


Using the microSD Card

There are a number of examples included in the Arduino IDE that will help you get started using the microSD card. One of the best basic examples to get you started is the Datalogger example (in the Arduino ID under File...Examples...SD...Datalogger). This example will read several ADC values and store them to a file on your microSD card. Just be sure to remember to set the ChipSelect variable at the top of the file to a "10".



TinyCircuits Staff
TinyCircuits Staff

Author



Also in Learn

TinyZero Accelerometer BMA250 Internet of Things Project with Cayenne
TinyZero Accelerometer BMA250 Internet of Things Project with Cayenne

by Laverena Wienclaw November 21, 2018

In this tutorial, we will use Cayenne to capture some accelerometer readings on their nice Internet of Things dashboard

View full article →

TinyZero Setup Tutorial
TinyZero Setup Tutorial

by Laverena Wienclaw November 21, 2018

Ready to get started with your new TinyCircuits product? This tutorial will cover basic setup of the TinyZero.

View full article →

Using the TinyZero Accelerometer
Using the TinyZero Accelerometer

by Laverena Wienclaw November 21, 2018

This tutorial will guide you through reading values from the Accelerometer that can be populated on the TinyZero

View full article →