Introduction: Keypad Piano
This tutorial will show how to create a basic 8 note piano using a 4x4 keypad and a passive buzzer.
In this project, the 1 through 8 keys will play notes on the piano, and the A-D buttons will play pre-set melodies.
Step 1: Connect Membrane Keypad to the Arduino.
Connect the keypad to the pins on the Arduino.
1. With the keypad facing up, connect a wire from the far left pin on the keypad to pin 9 on the Arduino.
2. Continue attaching wires from left to right on the keypad into the pins on the Arduino in descending order from 9 to 2.
Step 2: Connect the Passive Speaker to the Arduino
You will need 2 male to female wires to connect the passive speaker to the Arduino.
1. Attach female ends of the 2 wires to the passive speaker.
2. Attach 1 male end of the wire to pin 12 of the Arduino.
3. Attach the other male end of the wire to ground on the Arduino
Step 3: Run the Code Provided in This Instructable
1. The 1-8 buttons should make the speaker play different tones.
2. The 9 button will play the highest note possible for the Arduino
3. The 0 button will play the lowest note possible for the Arduino
4. The A button will play the Mario theme song
5. The B button will play Mary Had a Little Lamb.
6. The C button will play a basic scale.
7. The D button will play Twinkle Twinkle Little Star.
We have a be nice policy.
Please be positive and constructive.