by Budd Churchward - WB7FHC - NIBBLES AND BITS LIBRARY 'My Dog Has Fleas' - A Binary Music Machine« 1 2 3 4 5 6 7 8 9 10 11 12 » |
Section 2 - Sketch Research
Now that I have a speaker,
I spent a bit of time experimenting with my breadboard and a few parts. I knew
that I would have to somehow turn a pin on and off very quickly to get it to
create anything that might resemble a pleasant sound. That actually worked, but
while skimming through the reference section of the Arduino Site something
caught my eye: We have a command called: tone () !
So with this in mind, the goal of this unit is to write two sketches. First a simple one that will play four notes with four buttons. They are the strings on a ukulele: G C E A. |
|
The second sketch will be more sophisticated. We will use what we have been learning about binary numbers to create an Music Machine that will play two octaves with only four buttons! For now, the info on the right is from the Arduino Web Site. You can study it here, or click the logo above and jump to the full page. |
|