Hi again.. used the code below
while (S < 1000) {
S=(pulseIn(13,HIGH,20000);
if (millis()-t > 999){p=1;t=millis();
if (p == 1) {
SdPlay.setFile("START.AFM");
SdPlay.play();p=0;t=millis();}
and my loop played perfect!!.. BUT now i noticed another problem with pulseIn as i am reading a PWM input to change sounds...
any tips if i can do that? is this an interrupt problem or because changes of the timers? is there anyway to measure PWM while playing sound?