Can't play by folders using the Catalex serial MP3 player v1.2

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.

I got my board from AliExpress, I got to know about it following this repository on GitHub: YX6300-ArduinoSerialMP3Player/ArduinoSerialMP3Player.ino at master · semaf/YX6300-ArduinoSerialMP3Player · GitHub so I bought the one they say, the YX6300. Upon arrival I noticed the board was a little different that the pictures showed and it said v1.2 instead of v1.0 I thought that was cool that I got a newer version, as long as it worked okay.

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.

Thanks in advance:)

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]);
  }
}

way up at the top:


// YX5300 Sound Module
#define CMD_SEL_DEV 0X09
#define DEV_TF 0X02
#define CMD_SET_VOLUME 0X06
#define CMD_PLAY_W_INDEX 0X03
#define CMD_PLAY_FOLDER_FILE 0X0f   // 0x7E 06 0F 00 01 02 EF;( play folder 01/002.wav 

and, way up at the top:

// YX-5300
static unsigned int Send_buf[8] = {0}; // char string for YX-5300 commands

the part that gave me grief was not knowing you have to multiple the folder * 256

sendCommand(CMD_PLAY_FOLDER_FILE, 0X0F0000 + (folder * 256) + (random(1, filesPerFolder)));

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.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.