Pages: [1]   Go Down
Author Topic: 3 LED pushbuttons with Mp3's  (Read 942 times)
0 Members and 1 Guest are viewing this topic.
kENDALL
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino RTA!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Thanks
Logged


Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 509
Posts: 31472
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

kENDALL
Offline Offline
Newbie
*
Karma: 0
Posts: 5
Arduino RTA!!!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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


Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8084
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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...
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Full Member
***
Karma: 0
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's another option on the MP3 side:
http://www.sparkfun.com/products/9715
It's overkill perhaps, but you never know!
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 180
Posts: 8084
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Here's another option on the MP3 side:
http://www.sparkfun.com/products/9715
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
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Full Member
***
Karma: 0
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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 smiley 

The Sparkfun unit really seems to be simple and reliable.
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 199
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I hate to bring up the past, but you have GOT to see this:
http://www.mdfly.com/index.php?main_page=product_info&products_id=284

$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:

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

void loop() {

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

}



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.
Logged

Chicago
Offline Offline
Newbie
*
Karma: 1
Posts: 35
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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:
http://www.echelleinconnue.net/outils/mobio/composants/TDB380_datasheet_V2_(Tenda_Electronics).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?
Logged

Pages: [1]   Go Up
Jump to: