This shows you the differences between two versions of the page.
|
pm:prj2026:theodor_ioan.buliga:alexandru.ocanoaia [2026/05/11 10:36] alexandru.ocanoaia [General Description] |
pm:prj2026:theodor_ioan.buliga:alexandru.ocanoaia [2026/05/27 08:12] (current) alexandru.ocanoaia [Software Design] |
||
|---|---|---|---|
| Line 133: | Line 133: | ||
| ===== 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 148: | 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 ===== | ||