Okay first off I'm a nut for Halloween and this is a project for a decoration. I have found a great many prop controller on line and some using a UNO.
One controller has ambient sound playing until the PIR is triggered and then there is a Scare sound file that plays.
I'm wondering if I get a servo to animated a Skeleton mouth, can the sketch code have a line that randomly selects a file between a set of number? Say file 1 to file 20, and each file would be just called a number so that way the audio file could be changed without having to change the code.
this initializes a YX-5300 module and plays one of the 15 files in folder 0 at random upon startup:
delay(500);//Wait until chip initialization is complete
sendCommand(CMD_SEL_DEV, DEV_TF); //select the YX5300 TF card
//delay(200);//wait for 200ms
sendCommand(CMD_SET_VOLUME, 0x06001e);
randomSeed(analogRead(A0));
sendCommand(CMD_PLAY_W_INDEX, 0X030000 +random(1,15));// play on reset 1 of 15 files in root folder