Thanks for the info.
I looked and/or considered at a lot of the things that you suggested
Due to the sound file I think i am going to hard program the timing into the code. Too many other sounds that might trigger it
I was going to edit the sound file and put 20000hz tones where i needed them to trigger the lights but I couldn't get the code to recognize them for some reason
I did write this basic code to handle the timing while the file is playing but it didn't seem to work.
Is there something I missed?
void loop() {
val = digitalRead(buttonPin); // check button
if (val == HIGH) { // button pressed
playcomplete("hallo.wav"); // play file
Serial.println("Playing File");
while (wave.isplaying)
{
delay(16700);
digitalWrite(13,HIGH);
delay(200);
digitalWrite(13,LOW);
delay(50);
digitalWrite(13,HIGH);
delay(200);
digitalWrite(13,LOW);
delay(50);
digitalWrite(13,HIGH);
delay(150);
digitalWrite(13,LOW);
delay(50);
digitalWrite(13,HIGH);
delay(300);
digitalWrite(13,LOW);
delay(3000);