mp3 trigger v2 and arduino duemilanove ;)

Just wanted to share something back to this forum that helped me alot with other stuff.

I bought an mp3 trigger 2 i wanted to make it play back files using quiet mode instead of the buttons or the sensor inputs.
And with coding help from a buddy it works like a charm.

this little simple code makes the mp3 trigger go into quietmode and play tracks after your request. just change the tracknumber in playTrack(). My mp3 trigger is set to 9600baud rate with the firmware bootloader, you can change it to whatever you need in serial begin.
You could also go more advanced and use newsoftlibr and use some other pin configuration if you need…

Have fun!

code below
#include <SoftwareSerial.h>

//Just wire up 5v+ to vcc and gnd to gnd and connect pin 2 on arduino to the rx input on the mp3 trigger.

void setup(){
Serial.begin(9600);
setQuiet( true );
delay(500);
}
void loop(){

playTrack(3);
delay(5000);
playTrack(19);
delay(5000);
}

void setQuiet( bool quiet )
{
byte cmd[2] = { ‘Q’, quiet ? ‘0’ : ‘1’ };
Serial.write( cmd, sizeof(cmd) );

}

void playTrack( byte trackNr )
{
byte cmd[2] = { ‘t’, trackNr };
Serial.write( cmd, sizeof(cmd) );
}

I bought an mp3 trigger 2

Go a link to this device?

Thats right. Its sold by Sparkfun.

Vegard, i attempted your code and simple wiring on my Uno+MP3 Trigger V2. no success. any suggestions? (MP3 trigger plays files in standalone mode (no Arduino connection) using external power supply). (TX LED lights every few seconds on Uno too).

but no change in MP3 output. (I can sequence through the MP3 files manually using that rotary-pushbutton) thanks for your help.