Mini-piano With Sample Tune
mini-piano that can play a tune. once you start the simulation it will play a well known Christmas song for you to try and replay with the five piano notes given to you.
Supplies
You'll need:
-Five 10k Ohm resistors
-Five pushbuttons
-Buzzer/Piezo
-Breadboard
-Arduino
Setting Up Pushbuttons
First we are going to connect the Arduino to the breadboard, then add the five pushbuttons in a row as well as connect one of the pins (terminal 1a) to power on the breadboard.
Adding Resistors
once the pushbutton are on we are now going to add the 10k ohm resistors to terminal 2a on the pushbuttons, the reason why we do this is because resistors limit the amount of current going to certain components in the circuit and to prevent a short to ground when the pushbutton is pressed
Connecting Buzzer
Next step is to add the Buzzer/Piezo. you can add it anywhere you have space on the breadboard as long as the buzzer pin connects to the right input on Arduino Uno.
Code
Once the circuit is set up the last step is to add the code.