Data Sheet
44 : circuit 2b
PROGRAM OVERVIEW
Check to see if the first button is pressed.
A: If it is, play the frequency for c.
B: If it isn’t, skip to the next else if statement.
Check to see if the second button is pressed.
A: If it is, play the frequency for e.
B: If it isn’t, skip to the next else if statement.
Check to see if the third button is pressed.
A: If it is, play the frequency for g.
B: If it isn’t, skip to the else statement.
If none of the if statements are true, turn the buzzer off.
WHAT YOU
SHOULD SEE
Different tones will play when
you press different keys.
Turning the potentiometer will
adjust the volume.
Open the Arduino IDE
Connect the RedBoard to a USB port on your computer.
Open the Sketch:
File > Examples > SIK_Guide_Code-V_4 > SIK_CIRCUIT_B-DIGITAL TRUMPET
Select UPLOAD to program the sketch on the RedBoard.
SIK v4 Book Oct 13.indb 44 10/18/17 10:00 AM