absolute newbie here, so sorry in advance.
Project: Play random songs (file structure: 1.mp3, 2.mp2, ..., 328.mp3) from SD card when some sensor is being triggered.
I worked out how to gerenate a random file name.
But when inserting it in "musicPlayer.playFullFile() nothing happens.
Ive been working on this issue for hours now and I cant seem to figure it out.
I appreciate any help!
My Code:
Code: Select all
itoa(random(1, 329), voiceline, 10);
strcat(voiceline, ".mp3");
Serial.print(F("Playing "));
Serial.println(voiceline);
musicPlayer.playFullFile(voiceline);
Ive also tried different versions of whats in the () like:
Code: Select all
musicPlayer.playFullFile("/voiceline")
Code: Select all
musicPlayer.playFullFile("/'voiceline'")
Looking forward to help. Many thanks!!!