i bought this from ebay now i am totally confused to program this using UNO. this is the code i used but no luck >:(
#include <SoftwareSerial.h>
#define ARDUINO_RX 0//should connect to TX of the Serial MP3 Player module
#define ARDUINO_TX 1//connect to RX of the module
SoftwareSerial mySerial(ARDUINO_RX, ARDUINO_TX);
static int8_t Send_buf[8] = {0} ;
#define CMD_PLAY_W_INDEX 0x03
#define CMD_SET_VOLUME 0x31
#define CMD_SEL_DEV 0x35
#define DEV_TF 0x4
#define CMD_PLAY 0x7E
#define CMD_PAUSE 0xEF
#define CMD_SINGLE_CYCLE 0x19
#define SINGLE_CYCLE_ON 0x00
#define SINGLE_CYCLE_OFF 0x01
#define CMD_PLAY_W_VOL 0x22
void setup()
{
mySerial.begin(9600);
delay(500);//Wait chip initialization is complete
sendCommand(CMD_SEL_DEV, DEV_TF);//select the TF card
delay(200);//wait for 200ms
mySerial.print("playing...");
sendCommand(CMD_PLAY_W_VOL, 0X7E04440101EF);//play the first song with volume 15 class
}
void loop()
{
}
void sendCommand(int8_t command, int16_t dat)
{
delay(20);
Send_buf[0] = 0x7E; //starting byte
Send_buf[1] = 0xEF; //version
Send_buf[2] = 0x06; //the number of bytes of the command without starting byte and ending byte
Send_buf[3] = command; //
Send_buf[4] = 0x00;//0x00 = no feedback, 0x01 = feedback
Send_buf[5] = (int8_t)(dat >> 8);//datah
Send_buf[6] = (int8_t)(dat); //datal
Send_buf[7] = 0xEF; //ending byte
for(uint8_t i=0; i<8; i++)//
{
mySerial.write(Send_buf[i]) ;
}
}