Your Digital Media Has Never Looked So Good

 
drpeppermuseum
Topic Author
Posts: 3
Joined: Wed Aug 03, 2011 8:31 am

CSV program issues

Thu Mar 15, 2012 9:26 am

I have written a CSV file for a HD410 that is hooked up to an amp and a sound dome. There is just one audio file on the card that I want to play only when a button mounted near the sound dome is pushed. I want the audio file to play uninterrupted until it is over, even if the button is pressed. When it is over I want it to stop until the button is pressed again.

Right now the file does not start playing until the button is pressed but once it starts it is in an infinite loop and the button does nothing. Below is the program I have written. Thank you for any insight into what I might be doing wrong!

-Mary Beth Tait

GPIOENABLEINPUT 0

EVENTS button:0 audioend
STATE B216.mp3
STATE B216.mp3
 
RokuLyndon

Re: CSV program issues

Thu Mar 15, 2012 1:51 pm

GPIOENABLEINPUT,0,,
,,,
EVENTS,,button:0,audioend
State,silence.mp3,B216.mp3,
state,B216.mp3,,silence.mp3


SHould look more like this. That first state entry is the first file to play. So, if you want nothing playing, you need a dummy file, like an mp3 that's just silence, for example, Then a button press to play it, and no input under button zero for the second state, the actual audio file, which means it can't be i nterrupted. Finally, when it's done, it goes back to silence.

You can also use our gui brightauthor to build this project very easily. WIth the latest brightauthor 2.5, i created this project in about 30 seconds...capturing the image, and copying it to my dropbox account so I can post a pic of it.

The event handler is a generic do nothing state. Button zero plays your mp3, and when it's finished, it goes back to the do nothing state.

Image
 
drpeppermuseum
Topic Author
Posts: 3
Joined: Wed Aug 03, 2011 8:31 am

Re: CSV program issues

Thu Mar 15, 2012 2:28 pm

Thank you, I will give these a try!

Who is online

Users browsing this forum: No registered users and 1 guest