2.20.2011
Arduino: 2 (ART 350: Advanced Digital Media)
I have been working on building a wave shield for my arduino. The device allows for SD memory card input, so original audio can be used as opposed to the tones stored in the arduino software's library.
This feature allows the sounds produced based on user input to be more unique and suitable for the concept of this project.
I have also started working on some code for the project. I've been playing with some of the sketches to get a better feel for how the inputs and outputs work. Here is one that I am modifying for my project:
/*
Multiple tone player
Plays multiple tones on multiple pins in sequence
circuit:
* 3 8-ohm speaker on digital pins 6, 7, and 11
created 8 March 2010
by Tom Igoe
based on a snippet from Greg Borenstein
This example code is in the public domain.
http://arduino.cc/en/Tutorial/Tone4
*/
void setup() {
}
void loop() {
// turn off tone function for pin 11:
noTone(11);
// play a note on pin 6 for 200 ms:
tone(6, 440, 200);
delay(200);
// turn off tone function for pin 6:
noTone(6);
// play a note on pin 7 for 500 ms:
tone(7, 494, 500);
delay(500);
// turn off tone function for pin 7:
noTone(7);
// play a note on pin 11 for 800 ms:
tone(11, 523, 300);
delay(300);
}
I want the sounds to loop over each other for an extended period of time. As seen in this code, the sounds start at different times, but end up playing all at the same time. I need to continue working on importing my own sound from the wave shield.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment