# Adafruit Music Maker Shield

## Overview

![](https://cdn-learn.adafruit.com/assets/assets/000/016/622/medium800/adafruit_products_1790-00.jpg?1400258445)

Bend all audio files to your will with the Adafruit Music Maker shield for Arduino! This powerful shield features the VS1053, an encoding/decoding (codec) chip that can decode a wide variety of audio formats such as MP3, AAC, Ogg Vorbis, WMA, MIDI, FLAC, WAV (PCM and ADPCM). It can also be used to record audio in both PCM (WAV) and compressed Ogg Vorbis. You can do all sorts of stuff with the audio as well such as adjusting bass, treble, and volume digitally.   
  
All this functionality is implemented in a light-weight SPI interface so that any Arduino can play audio from an SD card. There's also a special MIDI mode that you can boot the chip into that will read 'classic' 31250Kbaud MIDI data from an Arduino pin and act like a synth/drum machine - there are dozens of built-in drum and sample effects! But the chip is a pain to solder, and needs a lot of extras. That's why we spun up the best shield, perfect for use with any Metro, Arduino Uno, Leonardo, Mega.

![](https://cdn-learn.adafruit.com/assets/assets/000/016/624/medium800/adafruit_products_1788-00.jpg?1400258474)

We have two versions of the shield. One version comes with an onboard 3W stereo amplifier so you can play amplified music with just some speakers. Another version comes without the amplifier, for cost-conscious projects.  
  
Both use the same code, are the same shape, and have Stereo Headphone/Line Out for connecting to a headset or amplifier.

![](https://cdn-learn.adafruit.com/assets/assets/000/016/625/medium800/adafruit_products_1788-01.jpg?1400258629)

We believe this is the best MP3 playing shield you can get, and at a great price too. Here are some specs:

- Features the VS1053B codec chip - decodes Ogg Vorbis, MP3/MP2/MP1, MP4, AAC, WMA, FLAC, WAV/PCM, MIDI. Encodes Ogg or WAV/PCM
- Stereo audio out with proper audio filter caps and ground reference so it can be safely connected directly to headphones, a stereo system or other powered speakers
- 7 extra GPIO's that can be written or read through the Arduino Library for reading buttons or lighting LEDs
- MicroSD card socket, for any FAT16/FAT32 formatted SD card from 64Mb or greater.
- Full 3.3/5V level shifting for SD and MP3 chipsets
- Works with Arduino Uno, Mega, or Leonardo
- Built in MIDI synth/drum machine with dozens of instruments
- Plenty of optional breakouts for pins like the card-detect and microphone input

 **Revision history:**

- **As of Aug 23, 2023 -&nbsp;** we've updated this PCB with&nbsp;[Adafruit Pinguin](https://github.com/adafruit/Adafruit_Pinguin)&nbsp;to make a lovely and legible silkscreen. We've also updated the music maker to use the 2x3 SPI header instead of pins 11/12/13&nbsp; and the terminal blocks now come pre-soldered on.
- **Aug 20, 2014:** &nbsp;We updated the analog section to have more filtering, which should improve audio output quality (even more!) There are no wiring or code changes.

# Adafruit Music Maker Shield

## Pinouts

![](https://cdn-learn.adafruit.com/assets/assets/000/016/626/medium800/adafruit_products_pcb.jpg?1400261467)

There's a lot of stuff going on in this shield! Lets look at the board and all the pinouts. The amplifier version and non-amplifier version both use the same PCB so the pinouts are the same. We'll talk about just the amplifier separately at the bottom

# Main Control Breakouts
![](https://cdn-learn.adafruit.com/assets/assets/000/016/633/medium800/adafruit_products_control.jpg?1400262890)

The Music Maker shield has a bunch of pins required for use. We pre-wire all of them for you but there's still some flexibility in case you want to rewire.   
  
There are three 'totally fixed' pins, the hardware SPI pins:

- **SPI SCK** - connected to Digital # **13** (but can be connected to the ISP header with a jumper) - used by both the SD card and VS1053
- **SPI MISO** - connected to Digital # **12** (but can be connected to the ISP header with a jumper) - used by both the SD card and VS1053
- **SPI MOSI** - connected to Digital # **11** (but can be connected to the ISP header with a jumper) - used by both the SD card and VS1053

- **As of Aug 23, 2023 -&nbsp;** We've updated the music maker to use the 2x3 SPI header instead of pins 11/12/13

There are a couple other pins that are required for talking to the VS1053 to play MP3s and such

- **MCS** - this is the VS1053 chip select pin, connected to Digital **#7**
- **DCS** - this is the VS1053 data select pin, connected to Digital **#6**
- **CCS** - this is the SD Card chip select pin, connected to Digital **#4**
- **DREQ** - this is the VS1053 data request interrupt pin - connected to digital **#3**

There are also a few other pins that are not connected to any Arduino pin but are broken out:

- **RST** - this is the VS1053 reset pin, we connected it to the Arduino reset pin so you don't need to use this unless you really want to.
- **SPK Off** - this disables the amplifier - if you have the amplifier version and want to 'mute' instantly
- **TX** - this is serial data transmit from the VS1053 - its not used for any of our demos
- **RX** - this is serial data into the VS1053 - its used for MIDI synth playing
- **CD** - this is the card detect pin, it is tied to ground when a card is inserted. Use a pullup on a digital pin to detect when a SD card is inserted. We don't use it.

Warning: As of Aug 23, 2023 - We've updated the music maker to use the 2x3 SPI header instead of pins 11/12/13

# SPI Jumpers
![](https://cdn-learn.adafruit.com/assets/assets/000/016/631/medium800/adafruit_products_SPIjumpers.jpg?1400262475)

If you're using a Mega or Leonardo Arduino, you'll need to short the jumpers on the top right of the board, and install the 2x3 socket header. This is because those Arduinos use the 2x3 pin header for the hardware-SPI pins and hardware-SPI is required for the high-speed data transfer required by the VS1053 codec. We'll cover that in the Assembly step.

# GPIO Breakouts
![](https://cdn-learn.adafruit.com/assets/assets/000/016/632/medium800/adafruit_products_gpio.jpg?1400262588)

The VS1053 codec chip has 7 'General Purpose Input/Output' pins that you can use to detect button presses and/or light up a small LED. GPIO1 is also used to put it into MIDI mode. By default all these pins are pulled **low** to ground with 100K resistors. They are 3V logic level so if you want to attach a button, you can connect the two wires between the GPIO pin on the left and the 3V breakout on the right. If you don't want to use these pins just leave them be, they are not required for use!

# MicroSD Card Socket
![](https://cdn-learn.adafruit.com/assets/assets/000/016/629/medium800/adafruit_products_microSD.jpg?1400262246)

In order to play MP3, WAV, OGG, etc files, you'll need to store them on a MicroSD card. These are very very common, available in the Adafruit shop or any electronics store. You can use any FAT16/FAT32 formatted card from 64M up to 8G. Chances are its pre-formatted for this so you can just drop files on. This is a push-push socket, push the card in once to seat in, push again to pop out. The chip to the right is the level shifter to make it safe to use with 5V logic like Arduino

# Line Out
  
![](https://cdn-learn.adafruit.com/assets/assets/000/016/628/medium800/adafruit_products_lineout.jpg?1400262052)

For almost all purposes, the Stereo Line Out 3.5mm jack is what you'll want to get audio out of the shield. It's there on both versions of the shield. The two big silver capacitors on the right are DC blocking caps. This means that the audio is AC-coupled and is safe to use with any amplifier, headphone. etc. Line level is up to about 2V peak-to-peak. If you have a system that really needs 0.7Vpp or less, set the volume on the VS1053 in software.  
  
You can also plug in headphones, although it is not a very strong headphone driver, so may not sound loud if its lower than 32Ω impedance

# Microphone In
![](https://cdn-learn.adafruit.com/assets/assets/000/016/630/medium800/adafruit_products_micin.jpg?1400262387)

We break out the microphone/line in inputs, for recording audio. Some basic analog filtering is required depending on the electret microphone or amplifier. Check the VS1053 datasheet for how to connect up a mic!

# Amplifier Section
![](https://cdn-learn.adafruit.com/assets/assets/000/016/627/medium800/adafruit_products_amplifiersect.jpg?1400261591)

In the bottom left is an amplifier section, this is a stereo 3W amplifier, with bridge-tied load output. **It's only meant for driving speakers directly! Do not connect to another amplifier, use the line out for that! Also, you cannot bridge-tie R and L together -** if you need only one speaker, leave the unused one disconnected.  
  
[For the amplifier, we're using the TS2012 class D chipset, the same used in this amplifier board](https://www.adafruit.com/product/1552 "Link: https://www.adafruit.com/product/1552")

## Speaker connects
On the left are two sets of breakouts for Right and Left. Connect these directly to your 4 or 8Ω speakers. Ideally they are 4Ω 3W speakers or 8Ω 1W speakers. You will get louder audio with 4Ω speakers since the amplifier voltage is maxed out at 5V from the Arduino.   
If you have both speakers attached and you're playing loud audio, you may need to power the Arduino from DC power jack instead of USB since USB can only provide 5W (5V @ 1A) max and two 3W speakers = 6W!  
  

## +dB jumpers
The default amplification for the speakers is +6dB. This gives nice unclipped audio from the VS1053 even at highest volume. If by chance you can't amplify the audio (its not normalized right) or there's some other reason to need a higher amplification, you can short the +6dB or +12dB jumpers to increase the gain. **Don't do this unless you're really sure!** You can end up with really heavy clipping which sounds bad!  
# Adafruit Music Maker Shield

## Assembly

![](https://cdn-learn.adafruit.com/assets/assets/000/016/644/medium800/adafruit_products_1788-02.jpg?1400269877)

# Stack Alert
Info: 

Wanna stack? This tutorial shows how to use the plain header to connect to an Arduino. [If you want to use stacking headers](https://www.adafruit.com/product/85 "Link: https://www.adafruit.com/product/85"), don't follow these steps!

![adafruit_products_85-00.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/651/medium640/adafruit_products_85-00.jpg?1400270549)

# Attaching Headers (All Arduinos)
Begin by breaking the 36-pin male header into four pieces: one 10-pin, two 8-pin and one 6-pin. Stick the header into the Arduino sockets with the long pins down.  
  
Also place the 2x3 female socket header into the ICSP header on the right of the board

![adafruit_products_placeheader.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/650/medium640/adafruit_products_placeheader.jpg?1400270392)

Place the shield on top so that all the little pins stick out through the matching holes in the shield. It should match up perfectly!

![adafruit_products_placeshield.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/652/medium640/adafruit_products_placeshield.jpg?1400270589)

Solder in all the header

![adafruit_products_solder1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/653/medium640/adafruit_products_solder1.jpg?1400270629)

![adafruit_products_solder2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/654/medium640/adafruit_products_solder2.jpg?1400270634)

![adafruit_products_solder3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/655/medium640/adafruit_products_solder3.jpg?1400270640)

Don't forget the 6-pin socket!

![adafruit_products_solderisp.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/656/medium640/adafruit_products_solderisp.jpg?1400270653)

# ICSP Jumpers (Leonardo & Mega)
If you have a Leonardo or Mega, you'll need to close the three solder jumpers next to the ISP header. This configures the shield to use the ISP header for SPI communication. Its easy! Simply melt some solder to close the three jumpers.  
![](https://cdn-learn.adafruit.com/assets/assets/000/016/657/medium800/adafruit_products_leomega.jpg?1400270974)

You can also cut the mini wire between the other three jumpers to 'release' the digital #11, 12 and 13 pins from being tied to the SPI pins. You can do this after you've gotten things working.

# If you have the Amplified version....
Place the two blue terminal blocks in the slots next to the headphone jack

![adafruit_products_termplace.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/645/medium640/adafruit_products_termplace.jpg?1400270097)

Flip the board over, you can even have it on a table or use scotch tape to keep the terminal blocks in place

![adafruit_products_termflip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/646/medium640/adafruit_products_termflip.jpg?1400270118)

Solder the four pins with plenty of solder

![adafruit_products_solderingterm.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/647/medium640/adafruit_products_solderingterm.jpg?1400270153)

![adafruit_products_solderterm.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/648/medium640/adafruit_products_solderterm.jpg?1400270164)

To keep the rightmost speaker pin from bumping into the DC jack you may need to clip it with diagonal cutters

![adafruit_products_clipterm.jpg](https://cdn-learn.adafruit.com/assets/assets/000/016/649/medium640/adafruit_products_clipterm.jpg?1400270199)

# Adafruit Music Maker Shield

## Installing Software

To get started with the Music Maker, you'll need to control the built-in VS1053 chip by installing the [Adafruit\_VS1053 library](https://github.com/adafruit/Adafruit_VS1053_Library)

Open up the Arduino library manager:

![](https://cdn-learn.adafruit.com/assets/assets/000/082/818/medium800/adafruit_products_sensors_managelib.png?1571853368)

Search for&nbsp; **Adafruit\_VS1053** library and install it

![](https://cdn-learn.adafruit.com/assets/assets/000/082/820/medium800/adafruit_products_image.png?1571853521)

# Adafruit Music Maker Shield

## Play Music

## Load some MP3 files
Copy 2 MP3 files to a micro SD card and name them **track001.mp3** and **track002.mp3** (this is just for the test, you can re-name them later). Then push the uSD card into the slot on the shield  
Info: 

![](https://cdn-learn.adafruit.com/assets/assets/000/016/634/medium800/adafruit_products_microSD.jpg?1400263615)

![](https://cdn-learn.adafruit.com/assets/assets/000/016/635/medium800/adafruit_products_2013_07_25_IMG_2067-1024.jpg?1400263633)

Make sure you have a good quality SD card, some cheap SD cards won't work, causing confusion! Especially 'non-brand' knockoffs.

# Simple Audio Player Sketch
Connect the Arduino to your computer with a USB cable and plug your headphones into the headphone jack. Select **File-\>Examples-\>Adafruit\_VS1053-\>player\_simple** to load the example code.  
![](https://cdn-learn.adafruit.com/assets/assets/000/016/636/medium800/adafruit_products_playersimple.gif?1448047238)

We originally wrote the library for use with the Breakout board. Since the pinout's a little different we just need to make a minor change. Find this line:

```
Adafruit_VS1053_FilePlayer musicPlayer = 
  // create breakout-example object!
  Adafruit_VS1053_FilePlayer(BREAKOUT_RESET, BREAKOUT_CS, BREAKOUT_DCS, DREQ, CARDCS);
  // create shield-example object!
  //Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);
```

and change it to:

```
Adafruit_VS1053_FilePlayer musicPlayer = 
  // create breakout-example object!
  //Adafruit_VS1053_FilePlayer(BREAKOUT_RESET, BREAKOUT_CS, BREAKOUT_DCS, DREQ, CARDCS);
  // create shield-example object!
  Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);
```

To use the shield pinouts. Now upload the example. You should see the following:

![](https://cdn-learn.adafruit.com/assets/assets/000/016/638/medium800/adafruit_products_simpleplay.gif?1448047229)

And audio playing from the headphone jack.  
If you get

> Adafruit VS1053 Simple Test  
> Couldn't find VS1053, do you have the right pins defined?

Check that you commented out the breakout line and uncommented the shield line so it knows you're using a shield!  
# Interrupt/Background Version
Advanced users can also run **File-\>Examples-\>Adafruit\_VS1053-\>player\_interrupts.** This example demonstrates playing files in the background using interrupts. This allows you to do other things in your sketch while the music plays! It also has more error reporting and lists all the files found in the SD card  
  
Don't forget to do the same thing, updating the:  
```
Adafruit_VS1053_FilePlayer musicPlayer = 
  // create breakout-example object!
  Adafruit_VS1053_FilePlayer(BREAKOUT_RESET, BREAKOUT_CS, BREAKOUT_DCS, DREQ, CARDCS);
  // create shield-example object!
  //Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);
```

to:

```
Adafruit_VS1053_FilePlayer musicPlayer = 
  // create breakout-example object!
  //Adafruit_VS1053_FilePlayer(BREAKOUT_RESET, BREAKOUT_CS, BREAKOUT_DCS, DREQ, CARDCS);
  // create shield-example object!
  Adafruit_VS1053_FilePlayer(SHIELD_RESET, SHIELD_CS, SHIELD_DCS, DREQ, CARDCS);
```

You can see the output is more detailed - it also lists the names of the cards on the SD which can help if you're having problems naming the file:

![](https://cdn-learn.adafruit.com/assets/assets/000/016/639/medium800/adafruit_products_inttest.gif?1448047223)

# Adafruit Music Maker Shield

## MIDI Synth

With a few jumper connections, the board will boot up in MIDI mode that will read 'classic' 31250Kbaud MIDI data on a UART pin and act like a synth/drum machine - there are dozens of built-in drum and sample effects.  
  
By default, MIDI mode is not 'activated' - but its very easy to turn on. Start by soldering a jumper wire between **GPIO1** pin and **3V** on the shield and a wire from **Digital #2** to the **RX** pin on the shield, see the two yellow wires here:

![](https://cdn-learn.adafruit.com/assets/assets/000/016/640/medium800/adafruit_products_midimode.jpg?1400269276)

Now run **File-\>Examples-\>Adafruit\_VS1053-\>player\_miditest**

![](https://cdn-learn.adafruit.com/assets/assets/000/016/641/medium800/adafruit_products_midiexample.gif?1448047216)

Upload to the Arduino + Shield and listen on the headphone jack for the Ocarina scale being played. You can check the datasheet for a list of all the instruments (there's a lot!)

# Adafruit Music Maker Shield

## GPIO Pins

The VS1053 has 7 GPIO pins that can be read and written via the library. The player\_gpiotest sketch demonstrates how to do this. Be careful about pulling up GPIO1 - if the shield restarts when GPIO1 is connected to 3V logic, it will boot into 'MIDI' mode

Info: 

We can quickly demo the shield by slipping 3mm LEDs into alternating slots. Connect the positive (anode) to the 3V side of the dual strip

![](https://cdn-learn.adafruit.com/assets/assets/000/016/658/medium800/adafruit_products_gpioLED.jpg?1400271675)

## What? No current limiting resistors?
  
Strictly speaking, best practice is to use a current limiting resistor when driving an LED from a GPIO pin. In this case, the example sketch pulses each led only briefly, so there is no danger of damage. For more general use, you should select a resistor appropriate for the led you are using. See [All About LEDs](http://learn.adafruit.com/all-about-leds) for more detail.## Run the player\_gpiotest sketch
Connect the Arduino to your computer with a USB cable. Select **File-\>Examples-\>Adafruit\_VS1053-\>player\_gpiotest** to load the example code.   
  
Don't forget to uncomment the   

> Adafruit\_VS1053\_FilePlayer(SHIELD\_RESET, SHIELD\_CS, SHIELD\_DCS, DREQ, CARDCS);

line just like you did with the other examples.  
  
 If you have headphones, you will hear a beep at the start to indicate that the sketch is running. Then you should see the LEDs flashed in sequence.   
  
If you open the Serial Monitor, you can see the values that are written to and read from each GPIO pin.# Adafruit Music Maker Shield

## Library Reference

The full library reference documentation can be access via the link below:

[Adafruit VS1053 Arduino Library](https://adafruit.github.io/Adafruit_VS1053_Library/html/index.html)
The information here is a brief overview of the main functions of interest.

# Adafruit\_VS1053\_FilePlayer

The `Adafruit_VS1053_FilePlayer` class is derived from the `Adafruit_VS1053` class and provides high level functions for playing files stored on the VS1053 breakout SD Card reader. Use this class for easy access and playback of files stored on an SD card.

There are two general methods of playback:

- Non-interrupt / blocking playback via `playFullFile()`
- Interrupt based / non-blocking playback via `startPlayingFile()`

Danger: 

## Public Methods:

&nbsp;

> **Adafruit\_VS1053\_FilePlayer (int8\_t mosi, int8\_t miso, int8\_t clk,**  **int8\_t rst, int8\_t cs, int8\_t dcs, int8\_t dreq,** **int8\_t cardCS)** - Software SPI constructor. Uses Software SPI, so you must specify all SPI pins.  
>    
> **Adafruit\_VS1053\_FilePlayer (int8\_t rst, int8\_t cs, int8\_t dcs, int8\_t dreq,** **int8\_t cardCS)** - Hardware SPI constructor. Uses Hardware SPI and assumes the default SPI pins. This is what you'll likely use if you're using the shield.  
>   
> **boolean begin(void)** - Initialize communication and reset the chip. Returns true if a VS1053 is found  
>   
> **boolean useInterrupt(uint8\_t type)** - Specifies the interrupt to use for interrupt-driven playback. Valid arguments are:  
> 
> - VS1053\_FILEPLAYER\_TIMER0\_INT
> - VS1053\_FILEPLAYER\_PIN\_INT
> 
>   
> **boolean startPlayingFile(char \*trackname)** - Begin playing the specified file from the SD card using interrupt-driven playback. This allows your program to perform other tasks as the file is playing.  
>   
> **boolean playFullFile(char \*trackname)** - Play the complete file. This function will not return until the playback is complete.

## Public Member Variables:

> **File currentTrack** - File currently being played  
>   
> **boolean playingMusic** - True if playback in progress

# Adafruit\_VS1053

The `Adafruit_VS1053` class implements an interface to the basic VS1053 functionality. For more detail on the operation of the VS1053 chip, please refer to the documentation on the Downloads page (see the link to the left). Its a little more powerful but it's also harder to use. We suggest sticking to the FilePlayer class (previous section) which abstracts a lot of this out for you.

### public Methods:

> **Adafruit\_VS1053(uint8\_t mosi, uint8\_t miso, uint8\_t clk,** **uint8\_t rst, uint8\_t cs, uint8\_t dcs, uint8\_t dreq)** - Software SPI constructor - must specify all pins.  
>    
> **Adafruit\_VS1053(uint8\_t rst, uint8\_t cs, uint8\_t dcs, uint8\_t dreq)** - Hardware SPI constructor - assumes hardware SPI pins.  
>   
> **uint8\_t begin(void)** - Initialize SPI communication and (hard) reset the chip.  
>   
> **void reset(void)** - Performs a hard reset of the chip.  
>   
> **void softReset(void)** - Attempts a soft reset of the chip.  
>   
> **uint16\_t sciRead(uint8\_t addr)** - Reads from the specified register on the chip.  
>   
> **void sciWrite(uint8\_t addr, uint16\_t data)** - Writes to the specified register on the chip.  
>   
> **void sineTest(uint8\_t n, uint16\_t ms)** - Generate a sine-wave test signal.  
>   
> **void spiwrite(uint8\_t d)** - Low-level SPI write operation.   
>   
> **uint8\_t spiread(void)** - Low-level SPI read operation.  
>   
> **uint16\_t decodeTime(void)** - Reads the DECODETIME register from the chip.  
>   
> **void setVolume(uint8\_t left, uint8\_t right)** - Set the output volume for the chip.  
>   
> **void dumpRegs(void)** - Prints the contents of the MODE, STATUS, CLOCKF and VOLUME registers.  
>   
> **void playData(uint8\_t \*buffer, uint8\_t buffsiz)** - Decode and play the contents of the supplied buffer.  
>   
> **boolean readyForData(void)** - Test if ready for more data.  
>   
> **void applyPatch(const uint16\_t \*patch, uint16\_t patchsize)** - Apply a code patch (See datasheet for details).  
>   
> **uint16\_t loadPlugin(char \*fn)** - Load the specified plug-in.  
>   
> **void GPIO\_digitalWrite(uint8\_t i, uint8\_t val)** - Write to a GPIO pin.  
>   
> **void GPIO\_digitalWrite(uint8\_t i)** - Write to all 8 GPIO pins at once.  
>   
> **uint16\_t GPIO\_digitalRead(void)** - Read all 8 GPIO pins at once.  
>   
> **boolean GPIO\_digitalRead(uint8\_t i)** - Read a single GPIO pin.  
>   
> **void GPIO\_pinMode(uint8\_t i, uint8\_t dir)** - Set the Pin Mode (INPUT/OUTPUT) for a GPIO pin.  
>   
> **boolean prepareRecordOgg(char \*plugin)** - Initialize chip for OGG recording.  
>   
> **void startRecordOgg(boolean mic)** - Start recording (mic = true for microphone input).  
>   
> **void stopRecordOgg(void)** - Stop the recording.  
>   
> **uint16\_t recordedWordsWaiting(void)** - Returns the number of words recorded.   
>   
> **uint16\_t recordedReadWord(void)** - Reads the next word from the buffer of recorded words.  
>   
> **uint16\_t recordedReadWord(void)** - Reads the next word from the buffer of recorded words.

# Adafruit Music Maker Shield

## Downloads

## Library:

- [Adafruit VS1053 Library](https://github.com/adafruit/Adafruit_VS1053_Library "Link: https://github.com/adafruit/Adafruit\_VS1053\_Library")

## Datasheets & Files

- [VS1053B (Codec chip) datasheet](http://www.adafruit.com/datasheets/vs1053.pdf "Link: http://www.adafruit.com/datasheets/vs1053.pdf")
- [TS2012 3W Class D amplifier datasheet](http://www.adafruit.com/datasheets/TS2012.pdf "Link: http://www.adafruit.com/datasheets/TS2012.pdf")
- [Details about the Ogg vorbis encoder/recorder](http://www.adafruit.com/datasheets/VorbisEncoder170c.pdf "Link: http://www.adafruit.com/datasheets/VorbisEncoder170c.pdf")
- [Fritzing objects in Adafruit Fritzing library](https://github.com/adafruit/Fritzing-Library)
- [EagleCAD PCB files in GitHub](https://github.com/adafruit/Adafruit-Music-Maker-MP3-Shield-PCB)

## Schematic and Fab Print (Rev E)
![](https://cdn-learn.adafruit.com/assets/assets/000/131/231/medium800/adafruit_products_schem.png?1720802085)

![](https://cdn-learn.adafruit.com/assets/assets/000/131/233/medium800/adafruit_products_fab.png?1720802187 dimensions are in inches)

## Schematic and Fab Print (v3)

optional amplifier is in right hand sheet

![](https://cdn-learn.adafruit.com/assets/assets/000/016/642/medium800/adafruit_products_schem.png?1400269761)

![](https://cdn-learn.adafruit.com/assets/assets/000/016/643/medium800/adafruit_products_fabprint.png?1400269777)

# Adafruit Music Maker Shield

## F.A.Q.s

### How can I use the MM shield with an IR receiver or RFID reader?

The MM chip (VS1053) wants to be fed data constantly so that it keeps the music playing. You can take small pauses to do stuff in between playing, and for real-time sensors like IR receivers, you'll have to not-use interrupt based playing and instead pause to read.&nbsp;

### Is there a line audio in?

No there is not.

### Is there fine Volume Adjustment?

No. But you can adjust the volume up in +6 dB increments with the +6dB and +12dB jumpers (but be very careful doing so).


## Featured Products

### Adafruit "Music Maker" MP3 Shield for Arduino w/3W Stereo Amp

[Adafruit "Music Maker" MP3 Shield for Arduino w/3W Stereo Amp](https://www.adafruit.com/product/1788)
Bend all audio files to your will with the Adafruit Music Maker shield for Arduino! This powerful shield features the VS1053, an encoding/decoding (codec) chip that can decode a wide variety of audio formats such as MP3, AAC, Ogg Vorbis, WMA, MIDI, FLAC, WAV (PCM and ADPCM). It can also be...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1788)
[Related Guides to the Product](https://learn.adafruit.com/products/1788/guides)
### Adafruit "Music Maker" MP3 Shield for Arduino (MP3/Ogg/WAV...)

[Adafruit "Music Maker" MP3 Shield for Arduino (MP3/Ogg/WAV...)](https://www.adafruit.com/product/1790)
Bend all audio files to your will with the Adafruit Music Maker shield for Arduino! This powerful shield features the VS1053, an encoding/decoding (codec) chip that can decode a wide variety of audio formats such as MP3, AAC, Ogg Vorbis, WMA, MIDI, FLAC, WAV (PCM and ADPCM). It can also be...

Out of Stock
[Buy Now](https://www.adafruit.com/product/1790)
[Related Guides to the Product](https://learn.adafruit.com/products/1790/guides)
### Stereo Enclosed Speaker Set - 3W 4 Ohm

[Stereo Enclosed Speaker Set - 3W 4 Ohm](https://www.adafruit.com/product/1669)
Listen up! This set of two 2.8" x 1.2" speakers are the perfect addition to any audio project where you need 4 ohm impedance and 3W or less of power. We particularly like these speakers as they are small and enclosed for good audio volume and quality. The pair have a handy SPK input...

In Stock
[Buy Now](https://www.adafruit.com/product/1669)
[Related Guides to the Product](https://learn.adafruit.com/products/1669/guides)
### Speaker - 3" Diameter - 4 Ohm 3 Watt

[Speaker - 3" Diameter - 4 Ohm 3 Watt](https://www.adafruit.com/product/1314)
Listen up! This 3" diameter speaker cone is the perfect addition to any audio project where you need an 4 ohm impedance and 3W or less of power. We particularly like this cone as it has 4 handy mounting tabs 60mm apart.  
  
Works great with our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1314)
[Related Guides to the Product](https://learn.adafruit.com/products/1314/guides)
### Speaker - 3" Diameter - 8 Ohm 1 Watt

[Speaker - 3" Diameter - 8 Ohm 1 Watt](https://www.adafruit.com/product/1313)
Listen up! This 3" diameter speaker cone is the perfect addition to any audio project where you need an 8 ohm impedance and 1W or less of power. We particularly like this cone as it has 4 handy mounting tabs 60mm apart.  
  
Works great with our <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/1313)
[Related Guides to the Product](https://learn.adafruit.com/products/1313/guides)
### Bone Conductor Transducer with Wires - 8 Ohm 1 Watt

[Bone Conductor Transducer with Wires - 8 Ohm 1 Watt](https://www.adafruit.com/product/1674)
Drown out the voices in your head with a bone conduction transducer! This incredible speaker does not have a moving cone like most speakers you've seen, instead, a small metal rod is wrapped with the voice coil. When current is pulsed through the coil, the magnetic field causes a piece of...

In Stock
[Buy Now](https://www.adafruit.com/product/1674)
[Related Guides to the Product](https://learn.adafruit.com/products/1674/guides)
### Adafruit METRO 328 Fully Assembled - Arduino IDE compatible

[Adafruit METRO 328 Fully Assembled - Arduino IDE compatible](https://www.adafruit.com/product/50)
We sure love the ATmega328 here at Adafruit, and we use them&nbsp;_a lot_&nbsp;for our own projects. The processor has plenty of GPIO, Analog inputs, hardware UART SPI and I2C, timers and PWM galore - just enough for most simple projects. When we need to go small, we use a <a...></a...>

Out of Stock
[Buy Now](https://www.adafruit.com/product/50)
[Related Guides to the Product](https://learn.adafruit.com/products/50/guides)

## Related Guides

- [Trellis 3D Printed Enclosure](https://learn.adafruit.com/trellis-3d-printed-enclosure.md)
- [OLED TRON Clock](https://learn.adafruit.com/oled-tron-clock.md)
- [WiFi Candy Bowl Monitor](https://learn.adafruit.com/wifi-candy-bowl.md)
- [Reverse Geocache Box](https://learn.adafruit.com/reverse-geocache-engagement-box.md)
- [Circuit Playground: D is for Diode](https://learn.adafruit.com/circuit-playground-d-is-for-diode.md)
- [Adafruit Ultimate GPS](https://learn.adafruit.com/adafruit-ultimate-gps.md)
- [Programming Arduino with Android and Windows Tablets](https://learn.adafruit.com/programming-arduino-with-android-and-windows-tablets.md)
- [8BitBox](https://learn.adafruit.com/8bitbox.md)
- [Current Limiting Stepper Driver with DRV8871](https://learn.adafruit.com/current-limiting-stepper-driver-with-drv8871.md)
- [Arduino Tips, Tricks, and Techniques](https://learn.adafruit.com/arduino-tips-tricks-and-techniques.md)
- [2.8" TFT Touch Shield](https://learn.adafruit.com/2-8-tft-touch-shield.md)
- [Adalight Project Pack](https://learn.adafruit.com/adalight-diy-ambient-tv-lighting.md)
- [Adafruit 2.8" TFT Touch Shield v2 - Capacitive or Resistive](https://learn.adafruit.com/adafruit-2-8-tft-touch-shield-v2.md)
- [Trainable Robotic Arm](https://learn.adafruit.com/trainable-robotic-arm.md)
- [Arduino Lesson 4. Eight LEDs and a Shift Register](https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds.md)
