Mp3trigger not receiving?

Hi there,

so i finally managed to upload Mp3Trigger to Arduino. I was using the wrong version of Arduino. Thanks!

now, I’m don’t understand why I’m not able to transmit to Mp3Trigger. I’m using a simple code from the examples. I understand that I can type 1 or 2 or 3 in the Serial monitor to trigger the sounds? but nothing is sending or happening.

I’m tired both 9600 and 38400 baud rates but nothing seems to work.

I’m still a noob, so please forgive me if it’s sounds silly.

any help?

#include <SoftwareSerial.h>
#include <MP3Trigger.h>

SoftwareSerial trigSerial = SoftwareSerial(2, 3);
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();
}

Hi there,

First of all -

You need to use a Serial “device” to be able to speak to the Arduino.

In the example below you only start the Mp3Trigger, not the link between the computer and the Arduino.

Check out this site for more info: http://www.arduino.cc (click on the learning-tab)

What you need is something like:

void setup ()
{
  trigger.setup(&trigSerial);  //This also starts the serial for this device
  Serial.begin( same_speed_as_your_computer_listens_to);
}

void loop()
{
  trigger.update();
  if (Serial.available())
  {
      char LETTER_FROM_COMPUTER = Serial.read();
      if (LETTER_FROM_COMPUTER == '1')  
      {
	  //do something, i.e play track 1
       }
  }
}

Second,

What Arduino board are you using? Uno/Mega etc?

Thirdly,

Start slow. Learn the basics first then advance.

Using an external device is a bit harder than using a single device. Try to get a working Serial-program up and running first.

Once that is done the MP3Trigger should be easy to do.

Fourthly,

I had some issues with the triggers on the the MP3Trigger, it seems the triggers were only possible to trigger from hardware - as in, physically connecting the pins. Using the play function after defining a tracknumber to play yielded much better results.

Hope you get it running!