Differences

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

Link to this comparison view

pm:prj2026:theodor_ioan.buliga:alexandru.ocanoaia [2026/05/11 10:28]
alexandru.ocanoaia [Hardware Design]
pm:prj2026:theodor_ioan.buliga:alexandru.ocanoaia [2026/05/27 08:12] (current)
alexandru.ocanoaia [Software Design]
Line 51: Line 51:
  
 While the game is being played, the theme song from Formula 1 will play in the background. While the game is being played, the theme song from Formula 1 will play in the background.
 +
 ===== Hardware Design ===== ===== Hardware Design =====
  
Line 125: Line 126:
   * It will be controlled using PWM.   * It will be controlled using PWM.
   * It will be connected to the PD3 pin, because the OC2B is on that pin on the atmega328p microcontroller.   * It will be connected to the PD3 pin, because the OC2B is on that pin on the atmega328p microcontroller.
 +
 +{{:​pm:​prj2026:​theodor_ioan.buliga:​electric_scheme.png?​300|}}
 +
 +This is the electric scheme of my project, that represent the connections that I detailed in the structure of the components.
  
 ===== Software Design ===== ===== Software Design =====
  
 +Link repository: [[https://​github.com/​AlexOcanoaia/​F1_Reaction_Game| Repository]]
 +
 +The element that is new to this game is the multiplayer mode. Initially the game was a training method for the formula 1 drivers and of course was singleplayer. Because it will be a multiplayer game, will be fun to play with friends and train your reflexes.
 +
 +<note tip>
 +For this project, I am gonna use things that I learned from this laboraties:
 +  * **Laboratory 0: GPIO**: for leds
 +  * **Laboratory 1: UART**: for comunicating with the players (asking their names and send the statistics for each player at the end of the game)
 +  * **Laboratory 2: Interupts, Timers**: for implementing debounce and external interupts for buttons. In addition, implementing timers for counting the seconds.
 +  * **Laboratory 3: PWM**: for the buzzer to sing the formula 1 theme song
 +  * **Laboratory 4: ADC**: for the buttons for each player (along with an interupt) and for the potentiometer
 +  * **Laboratory 6: I2C**: for showing information about the score, time on the lcd 
 +</​note>​
 +
 +<​note>​
 +The structure of my project is:
 +<​code>​
 +Project
 +| - i2c.c
 +| - i2c.h
 +| - adc.c
 +| - adc.h
 +| - timers.c
 +| - timers.h
 +| - usart.c
 +| - usart.h
 +| - utils.c
 +| - utils.h
 +| - main.c
 +</​code>​
 +
 +I choose this structure for organizing (each protocol and feature will have a file). This is easier for me to read the code and debug.
 +</​note>​
  
 +<note tip>
 +For this project I am gonna use:
 +  * **A state machine**: I am gonna have 3 states (start of the game, middle of the game, end of the game). I will use this concept for dividing my code into 3 parts (I will have interupts that need to be working just in one state of the game).
 +  * No external library
 +</​note>​
  
 +<​note>​
 +Algorithms and data structures used:
 +  * **States of the game**: this is an enum
 +  * **UART Protocol**: For finding out the name of the players (and send it to the lcd) and comunicating their average time for the game
 +  * **I2C Protocol**: For showing the score, time, names on the lcd
 +</​note>​
 ===== Rezultate Obţinute ===== ===== Rezultate Obţinute =====
  
Line 143: Line 192:
  
 4 May 2026: Adding the block diagram. 4 May 2026: Adding the block diagram.
 +
 +11 May 2026: Complete the hardware design.
 +
 +16 May 2026: Explaning the features of the game.
 +
 +27 May 2026: Finish the code for the project.
 ===== Bibliografie/​Resurse ===== ===== Bibliografie/​Resurse =====
  
pm/prj2026/theodor_ioan.buliga/alexandru.ocanoaia.1778484505.txt.gz · Last modified: 2026/05/11 10:28 by alexandru.ocanoaia
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