I recently received an MP3 Trigger (robertsonics version). I've been trying to get it to work with a serial connection from an Arduino MEGA2560 and I'm not sure if I'm doing something wrong in the sketch or if something is wrong with the board.
I've tested the board itself, everything works fine, I can play mp3's and trigger them by jumping then on the board itself.
Here is how it is connected.
I do have a bluetooth shield on top but didn't think it would affect anything.
I'm testing it out with the MP3Trigger-for-Arduino-Master library with these examples:
MP3TriggerBasic
void setup(){
Serial.begin(115200); // standard for mp3trigger
}
void loop()
{
// play track 1. name on sd-card: 001.mp3
Serial.print("t");
Serial.write(1);
delay(5000);
// play track 5. name on sd-card: 005.mp3
Serial.print("t");
Serial.write(5);
delay(5000);
}
Aslo tried BasicSoftSerial Trigger, where I changed the serials to 18, 19 since i thought that was Serial 1 on the Mega.
#include <SoftwareSerial.h>
#include <MP3Trigger.h>
SoftwareSerial trigSerial = SoftwareSerial(18, 19);
MP3Trigger trigger;
void setup() {
// Start serial communication with the trigger (over SoftwareSerial)
trigger.setup(&trigSerial);
trigSerial.begin( MP3Trigger::serialRate() );
// Start looping TRACK001.MP3
trigger.setLooping(true,1);
}
void loop() {
// process signals from the trigger
trigger.update();
}
When I listen with headphones (which work fine when i play directly from the board itself) I'm hearing nothing. Also I've tried reformatting the card, uploading my own mp3's as well as uploading only 1 and naming it TRACK001.MP3.
I'm probably missing something super basic (i'm fairly new to all of this). Any ideas?