WAV Trigger issue with "wTrig.isTrackPlaying" command

Hi there,

I received my wav trigger and I have an issue with the commend “wTrig.isTrackPlaying”

I try to make led on when the command return true and to make led off when the command return false.

I have an issue that the command return false strait after the track is on before the track is finish. Is something wrong with my code?

void loop() {


  // Call update on the WAV Trigger to keep the track playing status current.
  wTrig.update();
   
  for (int i = 0; i < numOfButtons; i++)
  {
    if (digitalRead(buttonPins[i]) == HIGH)
    {
      if(millis()-buttons_pressed[i]>=minTime)
      {
        buttons_pressed[i]=millis();//storing the time of button pressed in idex i
        wTrig.trackPlayPoly(i+1); //play track number i poly
        Serial.print("track number: ");
        Serial.print(i+1);
        Serial.println(" Is playing");
        wTrig.update();
        digitalWrite(ledPins[i],wTrig.isTrackPlaying(i+1));
        if (!wTrig.isTrackPlaying(i+1)) {
          Serial.print(i+1);
          Serial.println(" Is done\n");
        }
        }
      }
    }

}

Thanks for any help!

Ok. So I received my WAV Trigger with firmware V1.28 while is should be 1.30 and above in order to work with that function. Is there anyway to uploud a new version via arduino? I don’t have SparkFun FTDI Basic to do the firmware update

1.28 is the current release, there are some test releases you can put on the WAV Trigger though that enable some experimental features.

Arduino can’t upgrade the firmware, you need the firmware update utility available from the page in the link below.

  • [Firmware Updates and Utilities
  • [/list]

    Instructions for updating can be found in the [hookup guide and you will also need a [FTDI Basic Breakout connected too the WAV Trigger to upload firmware too it. :-)](https://www.sparkfun.com/products/9716)](https://learn.sparkfun.com/tutorials/wav-trigger-hookup-guide-v11/all)](http://robertsonics.com/wav-trigger-downloads/)