audio fx board, trigger to play only once?

For Adafruit customers who seek help with microcontrollers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
thirtywest
 
Posts: 5
Joined: Fri Sep 29, 2017 12:05 pm

audio fx board, trigger to play only once?

Post by thirtywest »

I'm testing the pins on my board, and I cannot find a way to have a sound played just once, until the circuit is openend to reset it.

It's connected to a reed switch on a door, and as long as the switch is closed (the door is open in this case) the sound keeps repeating. I do not have the sound file labeled latch or hold. It's simply T01.ogg.

Is there a way to have the switch close the circuit, play the file once, and then do nothing until it's been "opened" again--resetting it for the next use?

thanks in advance.

User avatar
adafruit_support_mike
 
Posts: 67446
Joined: Thu Feb 11, 2010 2:51 pm

Re: audio fx board, trigger to play only once?

Post by adafruit_support_mike »

None of the triggers will do that, and holding one pin low as long as the board has power would prevent other pins from being recognized.

You can get the same effect by connecting a 10uF to 100uF capacitor to between the pin and GND though, with a 1M resistor in parallel with the cap.

When power is disconnected, the capacitor will drain through the 1M resistor. When you connect power, the capacitor will charge through the 100k pull-up resistor on the FX pin, but will stay low for the 125ms or so that it takes to trigger the pin. The pin won't go low again until you discharge the capacitor by connecting the pin to GND through a switch, or until you disconnect power.

Locked
Please be positive and constructive with your questions and comments.

Return to “Microcontrollers”