November 23, 2024, 05:40:17 AM

olimexino 32u4 + MOD-MP3-XLITE

Started by ste, March 09, 2015, 09:42:30 PM

Previous topic - Next topic

ste

Hi all,
I am trying to control MOD-MP3-XLITE with 32u4.

I have connected two boards with the UEXT cable, 5 volts to XLITE power input, TX & RX jumpers, BAT jumper.
I have one mp3 file on the SD and it works in stand alone mode.
As I understand from the example for OLIMEXINO-328 I have to serial print a command from from my controller to the XLITE board. Here is my sketch:

#define but 7

void setup(){
   pinMode( but, INPUT_PULLUP );
   
   Serial.begin(9600);   
        while (!Serial);
   
   delay(1000);   
}

void loop(){
        static boolean key = 0;
   int s = !digitalRead( but );
   
          if( s && key == 0 )
        {
          Serial.print("pnum 0\r\n");
          key = 1;
        }
   else if ( !s && key == 1 )
        {
          Serial.print("C\r\n");      
          key = 0;
        }
        delay(1);

}

I have also connect the 32u4 to power supply as it was written in the readme file.

What I am doing wrong?
Can anyone help me?

Thanks in advance!