Step 3Creating a melody (Arduino)
An Arduino board makes only one tone at a time (I’m sure there’s away you can get around that, leave a comment if you know how). To have more than one notes played simultaneously, I am using two Arduino boards.
Making a melody entails three variables: pitch, duration, and number of notes. The code is based on Arduino/Tutorial/Melody created by Tom Igoe. You can find the code here. A melody is called when if statement condition is met. The if statement searches for the combinations of three digital pins.
In pseudo code
If (Pin 13 == HIGH && PIN 12==LOW && Pin 11== HIGH) {playtone 3; }
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|















































