Difference between revisions of "Playing sound (with the MP3 shield) & pressure plates"
|Line 35:||Line 35:|
Revision as of 16:38, 30 January 2018
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
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 https://www.arduino.cc/en/Main/OldSoftwareReleases , 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.