Closed lyruiot closed 5 years ago
I am using an Arduino Nano and DFPlayer aka MP3-TF-16P
in my setup function, I call getTotalFolderCount ();
Serial.print("Folders in SD \t"); Serial.print(mp3.getTotalFolderCount( ));Serial.print("\n"); Serial.print("Tracks in folders **\t"); Serial.print(mp3.getTotalTrackCount ( ));Serial.print("\n"); Serial.print("Tracks in folder 01\t"); Serial.print(mp3.getFolderTrackCount(1));Serial.print("\n"); Serial.print("Tracks in folder 02\t"); Serial.print(mp3.getFolderTrackCount(2));Serial.print("\n"); Serial.print("Tracks in folder 03\t"); Serial.print(mp3.getFolderTrackCount(3));Serial.print("\n");
Output is shown below: Folders in SD 33 18:53:29.583 -> Tracks in folders ** 33 18:53:29.678 -> Tracks in folder 01 12 18:53:29.724 -> Tracks in folder 02 11 18:53:29.817 -> Tracks in folder 03 10
I think getTotalFolderCount (which inturn calls sendPacket(0x4F); ) counts the total number of tracks rather than the folders.
Has someone tried this command?
Apologies for posting in the wrong library.
I am using an Arduino Nano and DFPlayer aka MP3-TF-16P
in my setup function, I call getTotalFolderCount ();
Serial.print("Folders in SD \t"); Serial.print(mp3.getTotalFolderCount( ));Serial.print("\n"); Serial.print("Tracks in folders **\t"); Serial.print(mp3.getTotalTrackCount ( ));Serial.print("\n"); Serial.print("Tracks in folder 01\t"); Serial.print(mp3.getFolderTrackCount(1));Serial.print("\n"); Serial.print("Tracks in folder 02\t"); Serial.print(mp3.getFolderTrackCount(2));Serial.print("\n"); Serial.print("Tracks in folder 03\t"); Serial.print(mp3.getFolderTrackCount(3));Serial.print("\n");
Output is shown below: Folders in SD 33 18:53:29.583 -> Tracks in folders ** 33 18:53:29.678 -> Tracks in folder 01 12 18:53:29.724 -> Tracks in folder 02 11 18:53:29.817 -> Tracks in folder 03 10
I think getTotalFolderCount (which inturn calls sendPacket(0x4F); ) counts the total number of tracks rather than the folders.
Has someone tried this command?