Differences

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

Link to this comparison view

pm:prj2025:iivasciuc:cristina.margheanu [2025/05/13 23:42]
cristina.margheanu
pm:prj2025:iivasciuc:cristina.margheanu [2025/05/29 12:30] (current)
cristina.margheanu
Line 23: Line 23:
 **Component List** **Component List**
  
-*Arduino ​Uno Microcontroller ​Main Control ​Unit+| Component ​                | Features ​                                                         | Purchase link  | 
 +Arduino Microcontroller ​Main control unit – reads inputs from the joystick and generates outputs for sound and display. |  [[https://​www.optimusdigital.ro/​ro/​placi-avr/​2563-placa-de-dezvoltare-compatibila-cu-arduino-uno-atmega328p-i-ch340-si-cablu-50-cm.html?​search_query=Placa+de+Dezvoltare+Compatibila+cu+Arduino+UNO+%28ATmega328p+%C8%99i+CH340%29+si+Cablu+50+cm&​results=7|Arduino]] | 
 +| Analog Joystick (with 2 button) |Control ​for the dinosaur jump by pushing up on the first button. To control the start of the game or the restart after the game over appears, the 2nd button on the joystick must be moved to the right. The high score system is also controlled by the first joystick , by pushing it up in the start or game over menu.  | [[https://​www.emag.ro/​modul-joystick-compatibil-cu-arduino-uno-3874784221527/​pd/​D48GB9YBM/​|Joystick]] ​         | 
 +| Passive Buzzer (5V)           | For background sounds and melodies ​                                            | [[https://​emve.ro/​produs/​buzzer-traductor-de-sunet-semnalizator-electromagnetic-95mm-5vdc-loudity-ld-bzeg-0905/?​gad_source=1&​gad_campaignid=22126270764&​gbraid=0AAAAAqElCLiFdhZT3E2KsIJhyV5M4DIRx&​gclid=CjwKCAjw24vBBhABEiwANFG7yyEusWoOUXfgPbJtxOkUJhyCIAksTOVgP6-SABYA6FwJ5s7us0dVMhoCDjoQAvD_BwE|Buzzer]] ​         | 
 +| LCD 16x2 I²C                | Displays the game, score and obstacles in real time                                         | [[https://​www.optimusdigital.ro/​ro/​optoelectronice-lcd-uri/​4769-lcd-2004-cu-backlight-albastru-i-interfaa-i2c.html?​search_query=lcd+i2c&​results=17|LCD]] ​         | 
 +| Jumper wires                | Connecting the components ​                                            | [[https://​www.optimusdigital.ro/​ro/​toate-produsele/​877-set-fire-mama-tata-40p-15-cm.html?​search_query=tata+mama&​results=89|Wires]] ​         | 
 +| Mini breadboard ​            | Quick assembly of components ​                                    | [[https://​www.optimusdigital.ro/​ro/​prototipare-breadboard-uri/​13249-breadboard-300-puncte.html?​search_query=breadboard&​results=126|Breadboard]] ​         |
  
-*16x2 LCD Display (5V) - Displays the game in real time  
  
-*Analog Joystick (with 2 button) - Control for the dinosaur jump by pushing up on the first button. To control the start of the game or the restart after the game over appears, the 2nd button on the joystick must be moved to the right.+{{:​pm:​prj2025:​iivasciuc:​cirkit_design_dino.png?500|}}
  
-*Passive Buzzer (5V) - For background sounds and melodies ​+{{:​pm:​prj2025:​iivasciuc:​projectdino.jpg?​300|}}
  
-*Jumper wires Connections ​between ​components ​+** Pin configurations ** 
 +   ​LCD ​Arduino 
 +   * GND-GND 
 +   * VCC - 5V 
 +   * SDA - A4 
 +   * SCL - A5 
 +   ​Joystick - Arduino 
 +   * D2 - D1 
 +   * A1 - A1 
 +   * GND - GND 
 +   * 5V - 5V 
 +   * A3 - A0 
 +===== Software Design ===== 
 +* Development environment:​ Arduino IDE 2.3.6 
 + 
 +* Libraries : Wire.h(Used for I2C communication between Arduino and peripherals like the LCD display), LiquidCrystal_I2C(Extends LiquidCrystal to support I2C LCD screens, simplifying control and data handling), EEPROM.h -  used to persist the player'​s high score 
 + 
 + 
 +Game flow:  
 +Start Game: 
 +Display "Swipe left to Start Game" on the LCD screen. 
 +Wait for the player to swipe the second joystick to the right to start the game. 
 + 
 +Gameplay Loop: 
 +Begin continuous game execution. Monitor joystick inputs for jump actions (left joystick) and start/​restart actions (right joystick). 
 + 
 +Game Mechanics:​ 
 +Jump Action: 
 +When the left joystick is pushed up, the dinosaur character performs a jump. 
 +During a jump, obstacles are cleared based on the dinosaur'​s movement. 
 + 
 +Viewing the High Score: 
 +While in the Start Menu or after a Game Over, the player can push the left joystick upwards (as if jumping) to display the current high score on the LCD screen. This provides an intuitive and accessible way for the user to check their personal best without starting a new game. 
 + 
 +Scrolling World: 
 +Every cycle, the game world scrolls to simulate movement. 
 +Randomly generate obstacles (birds or cactus) on the top and bottom rows of the world. 
 + 
 +Collision Detection:​ 
 +Detect collisions ​between ​the dinosaur and obstacles. 
 +Trigger game over conditions if collisions occur, accompanied by a buzzer sound and score display. 
 + 
 +Game Over: 
 +Upon collision detection:​ 
 +Display "GAME OVER!" on the LCD screen along with the final score. 
 +Wait for the player to press the right joystick to restart the game. 
 +Reset the game world and score for a new game session. 
 + 
 +Additional Features 
 +Score Tracking: 
 +Continuously update and display the player'​s score on the LCD screen. 
 + 
 +Sound Feedback: 
 +Use the buzzer to provide auditory feedback for jump actions and game over conditions.
  
-* Mini breadboards - Quick assembly of components 
  
-{{:​pm:​prj2025:​iivasciuc:​cirkit_design_dino.png?​400|}} 
-===== Software Design ===== 
-<note tip> 
-</​note>​ 
 ===== Obtained Results ===== ===== Obtained Results =====
 +Code on GitHub : [[https://​github.com/​CristinaMargh/​DinoLCDGame | Repository]]
 +
 +Video: [[https://​drive.google.com/​drive/​folders/​1Wg_brmv11tL1jcmFgSj3oYv8UZ5u503E|Demo]]
 +
 +===== Bibliography and materials =====
 +[[https://​www.cirkitstudio.com/​|Hardware design]]
 +
 +
 +
 +
pm/prj2025/iivasciuc/cristina.margheanu.1747168933.txt.gz · Last modified: 2025/05/13 23:42 by cristina.margheanu
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