Differences

This shows you the differences between two versions of the page.

Link to this comparison view

pm:prj2022:robert:arduinospiano [2022/06/02 04:05]
andreea.bobe1112 [Bibliography/Resources]
pm:prj2022:robert:arduinospiano [2022/06/02 14:10] (current)
andreea.bobe1112 [Hardware Design]
Line 1: Line 1:
 ====== Arduino'​s Smart Piano ====== ====== Arduino'​s Smart Piano ======
 +
 +AUTHOR: Andreea-Cristina Bobe
 +
 +GROUP : 1221EA
 +
 +FACULTY: FILS
  
 ===== Introduction ===== ===== Introduction =====
  
-<note tip>This project will simulate a piano teacher ​using an Arduino breadboard.</​note>​+<note tip>This project will simulate a smart piano using an Arduino breadboard.  
 + 
 +Besides implementing a simple piano, where you can play any song you want (in the limit of an octave because I only manage to connect 8 pushbuttons as keynotes), I came up with the idea of creating a special mode for those who do not know how to play the piano.</​note>​
  
 ===== General Description ===== ===== General Description =====
  
-<​note>​The smart piano will have 2 operational modes:+<​note>​As I mentioned before, the smart piano will have 2 operational modes:
   * //​freestyle//​ mode   * //​freestyle//​ mode
   * //​teaching//​ mode    * //​teaching//​ mode 
Line 23: Line 31:
 For this project, I used: For this project, I used:
   * 1 Arduino UNO   * 1 Arduino UNO
-  * 2 Breadboards+  * 1 Breadboard
   * 10 red push-buttons,​ 8 corresponding to the notes for each degree of the scale, a switch mode button and an on/off button   * 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    * 8 white LEDs 
   * 1 passive buzzer   * 1 passive buzzer
-  * x 220Ω resistors +  * 11 x 220Ω resistors 
-  * 4 x 1kΩ resistors + 
-  * 2 x 2kΩ resistors +{{:​pm:​prj2022:​robert:​fantabulous_inari.png?​800 |}} 
-  * 2 x 5kΩ resistors +{{:​pm:​prj2022:​robert:​pschema1.png?​800 |}} 
-  * 2 x 10kΩ resistors +{{:​pm:​prj2022:​robert:​pschema2.png?800 |}}
-  * 2 x 100kΩ resistors +
-{{:​pm:​prj2022:​robert:​brilliant_crift.png?800 |}}+
  
-{{:​pm:​prj2022:​robert:​schema1.png?​800 |}} 
-{{:​pm:​prj2022:​robert:​schema2.png?​800 |}} 
  
 <note important>​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.</​note>​ <note important>​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.</​note>​
Line 43: Line 47:
 ===== Software Design ===== ===== Software Design =====
  
-My program contains the basic arduino functions ​setup() and loop() and some other more like getNote() function and learnSong()+In setup am setat intreruperile pe pinii pe care aveam butoane
-I used only 2 analogical pins for all the 8 pushbuttons correspoding to the keyboardso that at first we are obliged to find out the corresponding values of every buttonBased on what is displayed ​in the Serial monitor from A0 or A1we can deduce what note has been pressed.+ 
 +In loopin modul guided al pianului am aprins ledul corespunzator notei care trebuie apasate. 
 + 
 +In functiile ISR am preluat intreruperile de la butoane si am cantat nota corespunzatoare butonului folosind tone sau am schimbat modul / melodia. 
 + 
 +Melodiile alese au fost scrise ​in intr-o singura octava. 
 + 
 +Am definit notele muzicale folosite si de asemenea o variabila tempo pt a face pianul sa cante mai incet sau mai repede dupa preferinta. 
 + 
 +Functia sizeof returneaza numarul de bytesfiecare valoare int este compusa din 2 bytes (16 bits).
  
-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.+Variabila wholenote calculeza durata totala a unei note in ms
 ===== Obtained Results ===== ===== Obtained Results =====
  
Line 55: Line 68:
 ===== Bibliography/​Resources ===== ===== Bibliography/​Resources =====
  
-[[https://​www.instructables.com/​How-to-Multiple-Buttons-on-1-Analog-Pin-Arduino-Tu/​|How to connect multiple buttons to one pin]] 
 [[https://​maker.pro/​arduino/​projects/​buzzer|How to set up a buzzer]] [[https://​maker.pro/​arduino/​projects/​buzzer|How to set up a buzzer]]
pm/prj2022/robert/arduinospiano.1654131922.txt.gz · Last modified: 2022/06/02 04:05 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