Home Forums Sparkfun MP3 Shield Library Support Forum FilePlayer.ino Compiles but will not upload Reply To: FilePlayer.ino Compiles but will not upload

#3559

I thought I had responded earlier, about the ordering. The ATmega328 only has a few K of RAM. That is not enough to do a lot, noting the SdFat uses a huge chunk of that, leaving less. Take into consideration the above example directory dump is 220 bytes, to display the names of the 17 files is a 1/4K. Given that a Directory can have thousands of files, there is just not enough RAM to store all that and then sort it.

Rather the routine I implemented is typical for small micros, in that it operates ONE LINE at a TIME. printing that lines description and then reusing the RAM buffer for the next line. Where the selection is actually by its Offset in the list. Where the list is reproducibly presented by the SdCard. And the SdFAT lib function for dumping the Directory Listing is simply dumping the FAT, in the order it was created. Hence it is not sorted. So that it has infinite scalability.

Good Luck.