I wanted to use this to play certain songs when pushing a button, for this, I wanted to put this songs in folders and then tell it to play the folders.
Then I tried the Arduino project that was included in the repository after having loaded 5 folders with different songs in them to try it out. I was happy when I heard it playing one of the songs, then I told it to play the second folder but it played the same song (song 001 from folder 01) I could tell it to play the next song on the same folder but it won't play any songs in any other folders, oddly enough It does say it detects 5 folders in the ad card.
After looking online for a bit I found there was an upgrade from the YX5300 to the YX6300 but nobody mentions anything about this "1.2" version. It is clear that it doesn't work the same way as the others.
I can't find any documentation about this specific board with this specific chip, all I can find is about the boards that have the YX5300 and YX6300.
I'm at a loss here, I can't stop scratching my head over this and, as I can't find any information on my own I need to ask for help here. I will post in other places too.
Did You ask the supplier, manufacturer etc.?
Put Your device on the shelf until You find the obviously needed documentation. Go for device having documentation.
you did not tell us if you are a beginner or experienced. I don't have time for a beginner answer
this code is part of a burglar alarm. it selects from a folder or a group of folders, then selects a random file from that group of folders. it uses arrays. you may have to slice out portions and keep what you need. it is written for a YX5300m but give it a go for your module
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
// YX5300 sound module functions //////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
void playWAV (int sw)
{
int folder = folderArray[sw]; int filesPerFolder = filesPerFolderArray[sw];
randomFile(folder, filesPerFolder);
}
void randomFile(int folder, int filesPerFolder)
{
randomSeed(analogRead(A0));
sendCommand(CMD_PLAY_FOLDER_FILE, 0X0F0000 + (folder * 256) + (random(1, filesPerFolder)));
}
void sendCommand(uint8_t command, int16_t dat)
{
Send_buf[0] = 0x7e; //starting byte
Send_buf[1] = 0xff; //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);//data high byte
Send_buf[6] = (int8_t)(dat); //data low byte
Send_buf[7] = 0xef; //ending byte
for (uint8_t i = 0; i < 8; i++) //
{
Serial2.write(Send_buf[i]);
}
}
I have encountered the same problem. We develop commercial software, and have been using the "v1.0" mp3 player module with the Arduino Uno and Adafruit Metro M0 Express. If we swap in the "v1.2" "GD3300B" mp3 player, it does not work. I have written to sales@aideepen.com, one of the vendors on Amazon, and will report here if I learn something from them.