This shows you the differences between two versions of the page.
|
pm:prj2026:jan.vaduva:matei.mitnei [2026/05/09 23:38] matei.mitnei |
pm:prj2026:jan.vaduva:matei.mitnei [2026/05/10 00:24] (current) matei.mitnei |
||
|---|---|---|---|
| Line 17: | Line 17: | ||
| 1. All targets stand in a vertical position and the display shows an animation loop. The ATmega takes a few samples from the photoresistors to determine the reference light level of the room, then the servomotors lay down the targets, preparing for game start. | 1. All targets stand in a vertical position and the display shows an animation loop. The ATmega takes a few samples from the photoresistors to determine the reference light level of the room, then the servomotors lay down the targets, preparing for game start. | ||
| - | 2. Once the button is pressed, a countdown is shown and at the end of it the targets start rising randomly. The microcontroller measures the light continuously, each ADC conversion triggering an interrupt which compares the current result with the reference level. In case of a hit, it commands the corresponding servomotor to lower the target, it activates the buzzer and it increases the player’s score. When the score reaches 10, the game ends, leading to the next phase. If a target was raised and it wasn’t hit in the first three seconds (a time frame that shortens as game time passes), it counts as a miss and the motor lowers it. At three consecutive misses, the game is over. | + | 2. Once the button is pressed, a countdown is shown and at the end of it the targets start rising randomly. The microcontroller measures the light continuously (while the targets are raised), each ADC conversion triggering an interrupt which compares the current result with the reference level. In case of a hit, it commands the corresponding servomotor to lower the target, it activates the buzzer and it increases the player’s score. When the score reaches 10, the game ends, leading to the next phase. If a target was raised and it wasn’t hit in the first three seconds (a time frame that shortens as game time passes), it counts as a miss and the motor lowers it. At three consecutive misses, the game is over. |
| 3. For both win or lose situations, the display shows a message, the buzzer makes a sound and all targets get into their vertical position. | 3. For both win or lose situations, the display shows a message, the buzzer makes a sound and all targets get into their vertical position. | ||
| ==== Block Diagram: ==== | ==== Block Diagram: ==== | ||
| - | {{schema_bloc_matei_mitnei.png?650}} | + | |
| + | {{schema_bloc_matei_mitnei.png?nolink&660|}} | ||
| ===== Hardware Design ===== | ===== Hardware Design ===== | ||
| + | |||
| + | List of components: | ||
| + | |||
| + | * ATmega328P Xplained Mini | ||
| + | * 4 digits 7-segment display with the TM1637 module | ||
| + | * 3 x SG90 | ||
| + | * 3 x LDR | ||
| + | * 3 x Red LED | ||
| + | * Passive buzzer | ||
| + | * Push button | ||