Go Down

Topic: 3 LED pushbuttons with Mp3's (Read 2113 times) previous topic - next topic


I need to know if this is possible and what would I need to buy.
I own the arduino uno.

This is for an interactive installation, when a guest sees button 1 blinking they press it button will stay lit, when audio is done button 2 starts to blink, same with 3 then starts over, but if no-one has press a button on 2 or 3 after 3minutes it will reset to 1.

Has anyone done this or working on this that can help me?
What do I need and I also need help with the programming code.



Where is the audio coming from?
If it is to be the arduino then you need to get a wave shield from Lady Ada.


Yes, it would be from the arduino...have you done this project or something like this?


If you get the Wave Shield  (audio file player hardware for the Arduino) the programming will be fairly easy.

Draw out a "state machine".  In each state certain inputs will change to a new state:

1:  LED 1 is blinking
     if Button 1 is pressed, start playing Audio 1 and go to State 2
2:  LED 1 is steady and Audio 1 is playing
     When Audio 1 is done, start the 3-minute timer and go to State 3
3:  LED 2 is blinking
     if Button 2 is pressed, go to State 4
     if 3 minutes elapses, got to State 1
4:  LED2 is steady...
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


Here's another option on the MP3 side:
It's overkill perhaps, but you never know!


Here's another option on the MP3 side:
It's overkill perhaps, but you never know!

That looks like an excellent choice!

Another possibility I had not thought of earlier is controlling an iPod with the iPodSerial library: https://github.com/finsprings/arduinaap
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp


Tell me about it.   My personal project right now is to find a way to use an ipod shuffle in an alarm clock+sound machine I'm designing.   Love the small size and big capacity.  Hate the interface differences.   I'll likely just find a 2nd gen nano to do just that.   The only thing I'd say is that in MY project, if it goes wrong, I can just reboot the sucker - no public exposure :) 

The Sparkfun unit really seems to be simple and reliable.


I hate to bring up the past, but you have GOT to see this:

$10 plus whatever small SD card you have laying around.

Played with it for a few minutes and it works AMAZING. Here's a complete sketch:

Code: [Select]

void setup() {
// initialize the serial communication:
Serial.begin(4800); //Set to 4800 bps
Serial.print(0xEF, BYTE); // Reset board

void loop() {

Serial.print(1, BYTE); // Play first file
Serial.print(15, BYTE); // Play second file
Serial.print(0xEB, BYTE); // Suspend playing
Serial.print(0xEC, BYTE); // Resume playing


The "datasheet" at mdfly is ABSURDLY incomplete. To get the GOOD one, google "TDB380 pdf"

You can also use it as a dedicated MP3 player with no microcontroller by just soldering a couple pads and attaching some buttons.  Best piece of kit I've found under $100 by far.


I'm planning on using the TDB380 for my own project.  Just ordered a couple from MDFLY last night to try out.  One question I have is the MDFLY site seems to indicate the minimum input voltage is 6V, but the "good" PDF for the TBD380 is unclear... It says in one place anything from 5V to 30V will work, but in another place it says 6V min.  Actually it says both of those on page 2 of this PDF:

So... my question is, can I power this thing from the 5V pin off the Arduino Uno?  Or should I be doing some sort of dc dc converter or booster or something?

Go Up