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

New Tiny Arcade - Assembly Instructions (With Rev5 Boards)
New Tiny Arcade - Assembly Instructions (With Rev5 Boards)

by TinyCircuits Staff July 27, 2017

We are super excited to release our latest version of the beloved Tiny Arcade kit! This assembly tutorial features our...

View full article →

New Tiny Arcade - Assembly Instructions
New Tiny Arcade - Assembly Instructions

by TinyCircuits Staff July 25, 2017

We are super excited to release our latest version of the beloved Tiny Arcade kit! We've updated the design for...

View full article →

TinySaber Reprogramming - A How-To Guide
TinySaber Reprogramming - A How-To Guide

by TinyCircuits Staff July 18, 2017

This tutorial will walk you through how to reprogram your TinySaber to include custom POV text, special colors, lighting effects,...

View full article →