Hi,
I have a small question, which I can't seem to find the answer for on the web.
For a project I need the arduino to play 3 possible audio samples based on the input of a sensor. To put it simple:
if sensorval < 100 then play audiosample1
if sensorval > 300 then play audiosample2
if sensorval = 200 then play audiosample3
However, i can't seem to find how to play multiple audio sample with the arduino (preferrably the mini). I don't want generated tones by the pcm, but samples based on MP3's I have now. All the samples are approx. 2 to 3 seconds long. I found this code done by Micheal Smith (Arduino Playground - PCMAudio) which can play a pcm soundfile right of the Arduino, but that's just 1 file. Is there a possibility to do three? My guess would be that the storage on the arduino will be to small?
Sparkfun however sells MP3 boards (Breakout Board for VS1002 MP3 - BOB-00519 - SparkFun Electronics) than can play multiple MP3 files? However, can I connect this to the Arduino? And what about storage for the files? This somehow doesn't feel like the proper solution, but I'm not sure. Seems a bit overkill for just playing 3 samples? Besides, these boards are already quite big for my project, so it can't get any bigger than this...
Oh and to make things worse, i want to play this audio from small speaker, so a person 1m away would be able to hear it.
Sorry, I know I am asking a lot here. But if someone can just help me in the right direction that would help me a lot!