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

Tiny Arcade Assembly Instructions
Tiny Arcade Assembly Instructions

by TinyCircuits Staff September 18, 2016

Learn how to assemble your Tiny Arcade. You can read the step by step guide, or there's a video tutorial...

View full article →

Tiny Arcade Menu Update
Tiny Arcade Menu Update

by TinyCircuits Staff May 18, 2016

Update your Tiny Arcade software to the latest version from your computer.

View full article →

TinyScreen+ Windows 7/8 Driver Installation
TinyScreen+ Windows 7/8 Driver Installation

by TinyCircuits Staff May 18, 2016

Install the required drivers to use TinyScreen+ with Windows 7 and Windows 8.

View full article →