The problem I have is that it doesn't have a shuffle function, it only has a random function which leads to frequent repeats and also doesn't contain itself to one folder. It "randoms" the entire sd card or nothing.
My idea so far:
– Get number of tracks in folder.
– Load array using for loop where 1st song is in index 0
– Shuffle array.
– Play array.
The way my code works is that I continuously check for input in the main loop and then handle that input using functions. So in order not to stop this, I need to have a step in the loop check if the shuffle the player is "set" to shuffle play, then play the next index of the array when it stops playing.
I did try to code this (IMO really garbage code that I have no idea if is even sensible) and find a array randomiser using google, but suffice to say it didn't work at all. I really don't like arrays and I am struggling with this, could someone help?
I'm obviously happy to use simpler methods, but whatever the solution it has to be handled on the Arduino and play the next song in the way I described above.
Hope I've added what is needed, but if not let me know.