Catalex MP3 Module Help

I am having an issue with this module that came about when I attempted to play files by index, but this problem only occurred when I had more than 7 files on the SD card. The problem is simply that they will not play the correct files I command to play if there are more than 7 files on the SD card. I hope someone can help. :slight_smile:

I am using the command:

sendCommand(CMD_PLAY_W_INDEX, playFile);

This problem happens even when I put a specific integer in instead of a variable, so I immagine it has something to do with the way the Catalex module reads the files. I believe I have the files indexed properly on the SD card though.
For example:
001
002
003 ..ect

The index is not based on the name, but on the order in which they are created/loaded onto the SD card. For instance, if you load 002.mp3 onto the sd card, it will play when you call sendCommand(CMD_PLAY_W_INDEX, 1);

Also, you might be interested in trying out this MP3 library to help simplify your code.

Okay thanks! I'll check out the library. I do not believe that is the issue though. The files are in order on the SD card, and like I said, when I'm dealing with less than 7 files I have no issue calling the correct files to be played so the date they are added can't be what is creating this problem. Also, all of my files are in order, because they are numbered and sorted by their number by the file manager.

I'm agreeing with P_B. Regardless the number on the label, it's the order that they're written to the microSD.
Pull them all off and then put them back, one by one, by number.

Okay, I will try that. Thank you all for the quick response.

This worked! Obviously I guess. Thanks again.