Playing sound (with the MP3 shield) & pressure plates

From Interaction Station Wiki
Revision as of 15:38, 30 January 2018 by Boris (Talk | contribs)

Jump to: navigation, search


In this tutorial we will be attaching three pressure plates or button to an Arduino. When the pressure plate is activated the Arduino plays a .MP3 file.


Arduino Uno (+ usb cable)
Micro SD card (this stores the .MP3 files)
Sparkfun MP3 player shield (available for rent at the Interaction Station)
Pressure plates or buttons (available for rent at the Interaction Station)
An active speaker or headphones
MP3 files

Getting ready

Step 1: installing the Arduino IDE
Make sure you have downloaded the Arduino IDE (Integrated Development Environment) for the uploading the code to the Arduino board. If you don't have it, please go to , click on your operating system followed by pressing the 'just download' button. Install the software on your computer, but don't open it yet! If it opens automatically, don't worry, just close it.

Step 2: installing the libraries for the Sparkfun MP3 shield
The Sparkfun MP3 shield uses some libraries we need to set up in the Arduino IDE. Download MP3Libraries and extract it on your computer. To install these libraries, extract the contents of the MP3Libraries folder to the corresponding path for your operating system. This guide will continue on Mac OSX.


Finally connect the Arduino to your computer by using the usb cable.

Uploading code to the Arduino

Step 1: Opening and configuring the Arduino IDE
Open up the Arduino IDE while your Arduino is connected to your computer. Make sure your board and port is selected by the IDE similar to the screenshots beneath.

Arduino audio1.png The port can be named a bit different, that's not a problem.
Arduino audio2.png If you are using a Arduino Uno, select Arduino Uno. Otherwise.. well, you know.