This is an old revision of the document!
AUTHOR: Andreea-Cristina Bobe
GROUP : 1221EA
FACULTY: FILS
In the freestyle mode, you can play any song you want. The LED corresponding to the piano key you pressed will light up imediatelly.
In the teaching mode, the LED corresponding to the piano key on which you have to press will light up. If you pressed the correct piano key, the keyboard will move to the next note. Otherwise, all LEDS will change their color to red.
Using the active feedback way of learning (based on the repetition of all the notes learned until then) you will learn the desired song you always wanted.
For this project, I used:
At first I defined some important elements (the buzzer, the keyboard corresponding LEDs, the modes implemented on the Arduino Uno breadboard and some musical notes).
I also used 2 timers, one in order to control the leds and one for the buzzer. I added external interruptions, one for the switch button and one for the start/restart button.
Then, in the loop() function, I implemented the 2 modes of my smart piano, using the getNote() function and learnSong() function.
The getNote() function is used in the FREESTYLE MODE. When the user clicks on a key, the corresponding LED will light and the buzzer will sing the correct note.
The learnSong() function will teach you to play a song. All you have to do is to click on the keys that have the LED turned on. You will learn to play your favorite song in just a few minutes.
I used only 2 analogical pins for all the 8 pushbuttons correspoding to the keyboard, so that at first we are obliged to find out the corresponding values of every button. Based on what is displayed in the Serial monitor from A0 or A1, we can deduce what note has been pressed.