I am using Arduino Uno to control various LEDs in different combinations. I also have a SD that I would like to play either before, during or after each loop without interrupting the flow of the main sketch. Please tell me how that can be done. If someone already has a sketch as an example, I would very much appreciating receiving a copy. Thanks for any help you can give me. I am the rankest of beginners.
Arthur
Wave Shield
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- adafruit_support_bill
- Posts: 88093
- Joined: Sat Feb 07, 2009 10:11 am
Re: Wave Shield
The WaveHC wave playback is 'interrupt driven'. What that means is that a timer generates an interrupt at regular intervals to play the sound through the Wave shield. This is all transparent to your program. You only need to start the playback by calling "playfile", then your program can go on to do other things such as controlling your LEDs.
There are many example sketches in the tutorial: http://www.ladyada.net/make/waveshield/examples.html
Under "6 buttons, 6 sounds, multiple possibilities!", the link named "Play the wave file all the way through once, but allow other buttons to interrupt" shows that the sketch is free to scan the pushbuttons while the wave file is playing.
There are many example sketches in the tutorial: http://www.ladyada.net/make/waveshield/examples.html
Under "6 buttons, 6 sounds, multiple possibilities!", the link named "Play the wave file all the way through once, but allow other buttons to interrupt" shows that the sketch is free to scan the pushbuttons while the wave file is playing.
-
- Posts: 27
- Joined: Tue Oct 23, 2012 3:25 pm
Re: Wave Shield
Thanks for the immediate response. I'll check out the examples in the link. I'm sure I'll be able to find the answer to my particular problem.
Arthur
Arthur
Please be positive and constructive with your questions and comments.