Go Down

Topic: MP3 Trigger V2 + Arduino Problem (Read 479 times) previous topic - next topic

I have an arduino uno hooked up via GND + TX to a sparkfun MP3 Trigger v2's GND + RX.

I have installed the Mp3 Trigger library and the code I have is as follows

Code: [Select]
#include <MP3Trigger.h>
MP3Trigger trigger;
 
const int sensor = A0;


int valueP = 0;
int buttonState = 0;


void setup()
{
  trigger.setup(&Serial);
  Serial.begin( MP3Trigger::serialRate() );
}


void loop()
{
  valueP = analogRead(sensor);
 
  if (valueP < 200)
    {

         
         
          trigger.trigger(1);
         
    }     
}


When the sensor value goes below 200 the TX light on the arduino turns on equally with the mp3 triggers light going off.

So I should be getting audio, but I'm not.

I dont know if the code for triggering track one is the right one or not ?

Any help would be much appreciated.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy