SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By badgersnek
#194676
I'm using a WAV Trigger in a simple project of mine to trigger a single sound when a button is pressed. The circuit I was using has been working fine for over a year, but recently it stopped working. I was able to figure out that the SD Card was bad, so I recreated the wavtrigr.ini and copied the original sound file back with the same file name, and now I get a strange behavior. The WAV Trigger plays the sound file as soon as the board is powered on (which it never did before), and now when I press the button assigned to the trigger, I get a delay of about 2 seconds before the sound is played as expected. I thought this might be the board, so I purchased 2 others....same problem. So, I assumed it was the code in the Arduino I was using to read the button state and trigger the WAV Trigger. I was originally trigging it with a pulse of 5V when the button was pushed, and LOW all other times (didn't work), so I tried it with the invert checked and reversed the code sending a steady HIGH 5V to the trigger, and then LOW when the button was pushed. Same behavior -- The WAV Trigger plays the sound immediately after powering the board (the LED blinks 4 times, I believe), and then there's a delay of about 2 seconds between the button trigger and the sound playing. I have checked with a multi-meter that the drop from HIGH to LOW is happening instantly on the board, so it's not the signal that's delayed. This is driving me batty, since this was all working without any issues before! Can anyone think what might be happening? Here's the current contents of the wavtrigr.ini file:
Code: Select all
#TRIG 01, 2, 1, 1, 1, 1, 1, 0, ,
********************************************************************
This file was generated by the WAV Trigger Init File Maker v1.10
It is only required if you wish to over-ride default settings. You
may add your own comments below this line -->
By the way, I've tried this with the InitFile Maker v1.10 and v1.20. Same thing.
By badgersnek
#194689
So, I'm an idiot. The only issue is that I was using the "Invert" option in the wavtrigr.ini file incorrectly. :D