Hi. I need help interfacing an Arduino Mp3 Shield with my Arduino UNO Rev3. The Mp3 Shield looks like this:
I don't have a brand name for it but it does hold and play Mp3 files with the buttons(play,pause,next,last) fine. I was using the demo code on my Arduino but it never did anything.
There is a user manual (42218.rar - Google Drive)
which has the demo code on the last two pages.
I would appreciate it if someone could help me.
Demo Code:
//**************************************************
This code is to play the first music file in SD card.
You must make sure the SD card is plugged in and has
music file in it.
**************************************************/
unsigned char i;
char CMD_VOLUME[]={0x7E, 0x02, 0xA7, 0x0F, 0x7E};
char CMD_MODE[]={0x7E, 0x02, 0xA9, 0x02, 0x7E};
char CMD_SD[]={0x7E, 0x04, 0xA1, 0x00, 0x01, 0x7E};
void SendCMD(char *buf)
{
unsigned i;
for(i=0; i< sizeof(buf); i++){
Serial.write(buf[i]);
}
}
void setup(void)
{
/** wait until arduino mp3 shield get ready */
delay(1000);
Serial.begin(9600);
/** set volume */
SendCMD(CMD_VOLUME);
/** set play mode repeat all */
SendCMD(CMD_MODE);
/** select SD card first music and play */
SendCMD(CMD_SD);
}
void loop(void)
{
}
Thanks