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

Bluetooth Low Energy TinyShield (ST) Tutorial
Bluetooth Low Energy TinyShield (ST) Tutorial

by TinyCircuits Staff May 10, 2017

This tutorial will cover the basic operation of the Bluetooth Low Energy TinyShield (ST) using a standard TinyDuino and a Bluetooth-enabled device.

View full article →

How to Develop a Game for the TinyArcade
How to Develop a Game for the TinyArcade

by Brandon Farmer March 30, 2017

This Tutorial will walk you through how to develop your very own game for the TinyArcade, all within the Arduino...

View full article →

.TSV Video Converter Tutorial
.TSV Video Converter Tutorial

by TinyCircuits Staff March 30, 2017

Learn how to convert your videos to .TSV format using this Windows program!

View full article →