I'm trying to run the same sort of code on an Arduino Mega. When I upload my sketch (below) the result is a random mp3 and then the app just hangs. I reupload and a new random mp3 plays, not the mp3 requested in the code, then hangs after playing the first mp3. I'm using ports 0 and 1 off the Mega and powering the Trigger board off of the 5v and gnd off of the Mega.
"t" - tells the trigger to play a track
Here is a link to the source for the 't' reference: http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Widgets/MP3%20Trigger%20V2.5%20User%20Guide%202012-02-01.pdf
Am I the only one who has experienced this?
Here is the code I've written and based on the user guide should be working:
#include <SdFat.h>
#include <MP3Trigger.h>
MP3Trigger trigger;
void setup() {
Serial.begin(38400);
}
void loop() {
trigger.update();
Serial.write('t');
Serial.write(003);
Serial.print("\nThis is track003");
delay(5000);
Serial.write('t');
Serial.write(007);
Serial.print("\nThis is track007");
delay(5000);
Serial.write('t');
Serial.write(010);
Serial.print("\nThis is track010");
delay(5000);
Serial.write('t');
Serial.write(012);
Serial.print("\nThis is track012");
delay(5000);
Serial.write('t');
Serial.write(015);
Serial.print("\nThis is track015");
delay(5000);
Serial.write('t');
Serial.write(17);
Serial.print("\nThis is track017");
delay(5000);
}