Using the Audio TinyShield Tutorial

by TinyCircuits Staff February 24, 2016

Using the Audio TinyShield Tutorial

Overview:

The TinyShield Audio  makes it incredibly easy to add audio support to your TinyDuino projects. It has an onboard DAC, filter and amplifier for great sound quality. It can play any size uncompressed 22kHz, 16bit mono Wave files (.wav) directly off a microSD card (a TinyShield microSD Adapter is also required for this).


Powering the System

The Audio amplifier and the microSD card take more power than a coin cell battery can supply, so external power is required (such as USB), or from a larger battery.

The Audio TinyShield can be run across the entire TinyDuino voltage range (2.7 to 5.5V)


 

Using the Audio TinyShield

The Audio TinyShield uses three signals to create a synchronous serial connection to the DAC which generates the audio output, and this TinyShield is compatible with the waveHC library from Adafruit. Below is a sample sketch to get the audio data to play:

1. Plug in your TinyDuino to your computer with the USB TinyShield, the microSD TinyShield and the Audio TinyShield attached

2. Load the file "song1.wav" onto the microSD card from your computer. Then put the microSD card into the microSD TinyShield. You can download a sample song1.wav file here that will work: download

3. Upload the code using Codebender directly from this webpage.  Alternatively, open the Arduino IDE and copy the source code above into it, and upload to the TinyDuino.  

4. Plug in your headphones or powered speakers to the 3.5mm headset jack on the Audio TinyShield, and you should here the wave file being played


Adafruit Wave Shield Compatibility

The Audio TinyShield is completely compatible with the Adafruit Wave Shield for the standard Arduino, and they have great documentation on some more advanced things that can be done with this. Check out their Wave Shield documentation here.



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 →