
218 Make: Wearable Electronics
tone(buzzerPin, c, 250);
delay(300);
tone(buzzerPin, G, 250);
delay(300);
tone(buzzerPin, E, 250);
delay(300);
tone(buzzerPin, C, 500);
delay(1000);
}
See also these examples:
• Arduino melody tutorial (docs.arduino.cc/built-in-examples/digital
/toneMelody)
• Arduino pitch follower using the tone() function (docs.arduino.cc/built-
in-examples/digital/tonePitchFollower)
• Arduino simple keyboard using the tone() function (docs.arduino.cc
/built-in-examples/digital/toneKeyboard)
Note that there is a second tab in these sketches titled pitches.h that
defines frequencies for pitches at many octaves.
Despite the simplicity ...