Differences

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

Link to this comparison view

pm:prj2022:agmocanu:pianotiles [2022/05/11 22:25]
maria.sibiceanu
pm:prj2022:agmocanu:pianotiles [2022/05/27 20:59] (current)
maria.sibiceanu
Line 2: Line 2:
 ===== Introduction ===== ===== Introduction =====
  
-Synopsis of the project: ​ +Synopsis of the project: The following project presents an electronic device that can play the Piano Tiles Game.  
-  ​The following project presents an electronic device that can play the Piano Tiles Game.  +The game has tiles falling from the top of the screen. The player is expected to tap the tiles (black in colour) as quickly as possible without missing any. Using this electronic device, the player can make a higher score efficiently. I've chosen ​this project because I found it an exciting and easier way to win the game.
-  The game has tiles falling from the top of the screen. The player is expected to tap the tiles  +
-  ​(black in colour) as quickly as possible without missing any. Using this electronic device, ​ +
-  ​the player can make a higher score efficiently. ​ +
-  ​chose this project because I found it an exciting and easier way to win the game.+
 ===== Overview ===== ===== Overview =====
- +The colour of the tile is sensed as black or white using LDR, and touch is simulated at appropriate locations on the screen using a logic programmed into the Arduino.
-   The colour of the tile is sensed as black or white using LDR, and touch is simulated +
-    ​at appropriate locations on the screen using a logic programmed into the Arduino.+
     ​     ​
-{{:​pm:​prj2022:​agmocanu:​piano_tiles_circuit.png?600|}} + 
- + {{:​pm:​prj2022:​agmocanu:​pianotiles.png?400|}}
  
 ===== Hardware Design ===== ===== Hardware Design =====
Line 22: Line 16:
     - Arduino, Breadboard, 22k Resistor, LDR, Relay, Connecting wires, a conducting metal coin     - Arduino, Breadboard, 22k Resistor, LDR, Relay, Connecting wires, a conducting metal coin
     - Computer to program Arduino     - Computer to program Arduino
 +
 +{{:​pm:​prj2022:​agmocanu:​piano_tiles_circuit.png?​600|}}
 +
 +{{:​pm:​prj2022:​agmocanu:​piano.jpeg?​600|}}
 + 
  
  
 ===== Software Design ===== ===== Software Design =====
  
 +Arduino reads the voltage drop across the LDR. Observe the voltage for black and white tiles, and choose a suitable threshold voltage to say Vt ( in this case it's 700). If the voltage is less than the threshold voltage, then there is a larger drop across LDR, the larger the resistance, which implies a Black tile and vice versa. I have simulated the touch accordingly. The values of the delays can be tweaked to get the best result.
 +
 +  * Arduino(Embedded) C code for the project
 +  * Pin 4, 5, 6, 7 -> Relay output
 +  * Pin A2, A3, A4, A5 -> Analog input value from the LDRs.
 +  * Analog value less than 700 implies it Black tile. 
 +  * NOTE: It is to be calibrated based on ambient intensity and screen brightness.
 +  * Used void loop() and void setup().  ​
  
  
 ===== Obtained results===== ===== Obtained results=====
  
 +{{:​pm:​prj2022:​agmocanu:​piano_tiles_1.jpeg?​600|}}
 +
 +{{:​pm:​prj2022:​agmocanu:​piano_tiles_2.jpeg?​600|}}
 +
 +{{:​pm:​prj2022:​agmocanu:​piano_tiles_3.jpeg?​600|}}
  
  
 ===== Conclusion ===== ===== Conclusion =====
 + 
 + I have managed to complete all the requirements for a good project. There are still small problems regarding the LDR because of the phone'​s screen and the Relay'​s ability to conduct. I have learned how to use Arduino software to connect LDRs wires and coins accordingly so that the current will go through the coins correctly. ​
  
 ===== Download ===== ===== Download =====
 +
 +
 +Arduino Code: https://​github.com/​ShibaInu66/​PianoTiles-Game
  
  
 ===== Journal ​ ===== ===== Journal ​ =====
 +
 +  *   ​5.05.2022:​ Decided on the project + started the documentation
 +  *   ​12.05.2022:​ Gathering all the components
 +  *   ​15.05.2022:​ Assembling everything
 +  *   ​20.05.2022:​ Completing the Arduino Code
 +  *   ​24.05.2022:​ Concluding the documentation
  
  
 ===== Bibliography ===== ===== Bibliography =====
 +
 +[[https://​ocw.cs.pub.ro/​courses/​pm/​lab/​lab1-2022|USART]]
 +
 +[[https://​www.instructables.com/​Arduino-and-a-LDR-Light-Dependent-Resistor/​|LDR Arduino]]
 +
 +[[https://​arduinogetstarted.com/​tutorials/​arduino-relay|Relay Arduino]]
  
  
 +--------------------------------
  
 <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​ <​html><​a class="​media mediafile mf_pdf"​ href="?​do=export_pdf">​Export to PDF</​a></​html>​
  
  
pm/prj2022/agmocanu/pianotiles.1652297134.txt.gz · Last modified: 2022/05/11 22:25 by maria.sibiceanu
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