This is an old revision of the document!


Arduino's Smart Piano

Introduction

This project will simulate a piano teacher using an Arduino breadboard.

General Description

The smart piano will have 2 operational modes:

  • freestyle mode
  • teaching mode

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.

Hardware Design

For this project, I used:

  • 1 Arduino UNO
  • 2 Breadboards
  • 10 red push-buttons, 8 corresponding to the notes for each degree of the scale, a switch mode button and an on/off button
  • 8 white LEDs
  • 1 passive buzzer
  • 2 x 220Ω resistors
  • 4 x 1kΩ resistors
  • 2 x 2kΩ resistors
  • 2 x 5kΩ resistors
  • 2 x 10kΩ resistors
  • 2 x 100kΩ resistors

In Fixed do, each syllable corresponds to the name of a note. In the major Romance and Slavic languages, the syllables Do, Re, Mi, Fa, Sol, La, and Si are used to name notes the same way that the letters C, D, E, F, G, A, and B are used to name notes in English.

Software Design

My program contains the basic arduino functions setup() and loop() and some other more like getNote() function and learnSong().

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.

I also used 2 timers, one in order to control the leds and one for the buzzer. I added interruptions, one for the switch button and one for the start/restart button.

Obtained Results

Conclusions

Download

Bibliography/Resources

pm/prj2022/robert/arduinospiano.1654131983.txt.gz · Last modified: 2022/06/02 04:06 by andreea.bobe1112
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0