Differences

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

Link to this comparison view

pm:prj2025:iivasciuc:cristina.margheanu [2025/05/07 18:02]
cristina.margheanu [Block scheme]
pm:prj2025:iivasciuc:cristina.margheanu [2025/05/29 12:30] (current)
cristina.margheanu
Line 3: Line 3:
 ====== Introduction ===== ====== Introduction =====
 <note tip> <note tip>
-**Dino LCD Game** is an interactive game inspired by the famous Dino game in Chrome, implemented on a microcontroller and displayed on an LCD screen. The player controls a dinosaur that must avoid obstacles ​by jumping over them, using a joystick. The game also includes a continuous soundtrack, a start menu and a scoring system stored in EEPROM. The goal of the project is to apply the knowledge acquired in the labs in an educational way, resulting in a portable and fully functional game. In this way, the perception of the dinosaur, that can be a little annoying because it appears when I am offline, can be slightly changed.+**Dino LCD Game** is an interactive game inspired by the famous Dino game in Chrome, implemented on a microcontroller and displayed on an LCD screen. The player controls a dinosaur that must avoid obstacles , using a joystick. The game also includes a continuous soundtrack, a start menu and a scoring system stored in EEPROM. The goal of the project is to apply the knowledge acquired in the labs in an educational way, resulting in a portable and fully functional game. In this way, the perception of the dinosaur, that can be a little annoying because it appears when I am offline, can be slightly changed.
 </​note>​ </​note>​
 ====== General description ===== ====== General description =====
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 button) - Control for the dinosaur jump +{{:​pm:​prj2025:​iivasciuc:​cirkit_design_dino.png?​500|}}
  
-*Passive Buzzer (5V) - For background sounds and melodies ​+{{:​pm:​prj2025:​iivasciuc:​projectdino.jpg?​300|}}
  
-*Resistors (220Ω and 10KΩ) ​For circuit protection+** 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
  
-*Jumper wires - Connections ​between ​components ​+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
  
-* Mini breadboards - Quick assembly of components 
  
-*3.7V LiPo cells (x2 for 7.4V- Portable power supply+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 cactuson 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.
  
-*LiPo Charging Module - For recharging the battery ​ 
  
-===== 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.1746630155.txt.gz · Last modified: 2025/05/07 18:02 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