I’m hacking a project to program a series of sounds(mp3) or 1 sound to play when I press a button(s) or possibly activate it by a sensor.
I plan to hack the code for it to play mp3s in a code function on this.
[amazon_link asins=’B01BT4N386′ template=’PriceLink’ store=’context’ marketplace=’US’ link_id=’22c63090-31b7-11e8-8c57-5d70b7331de5′]fVBRC3ARIsAIifYONclt7rqVV0gxlpoywcpV3WEeC9oMMC7olExjxY7h_ZbZVso35oSh0aAqMXEALw_wcB]
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 Arduino Uno, Leonardo or Mega.
This version of the shield includes an onboard 3W/channel stereo audio amplifier that can drive 4 or 8 ohm speakers. It’s the same amplifier as in our TS2012 breakout, a great class D amplifier that sounds good and is power-conscious for portable/battery usage. Volume control is handled by the VS1053 chip. We also have a version without an amplifier, when only line/headphone out is required.
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
Each order comes with one fully-assembled and tested shield, 2 2-pin terminal blocks, a stick of 0.1″ male header and 2×3 female header for the ICSP connection. Some light soldering is required to attach the through-hole headers to the PCB for plugging into the Arduino as well as the terminal blocks for the speakers. Speakers, $1 headphones, SD card and Arduino not included!
AdaFruit is wrapping up the full tutorial with photos of the shield, but for now we have a detailed tutorial with lots of information about the VS1053 as well as instructions for how to use our Arduino library that will get you playing sound effects in under 30 minutes