You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/versioned_docs/version-acs_cc/project/2026/elena_alexia.mocanu/index.md
+76-6Lines changed: 76 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,8 @@ Hardware Rhythm Game
10
10
11
11
## Description
12
12
13
-
Rhythm game follows the standard mechanics of this genre: the player needs to hit the notes at the right time using the buttons on the breadboard. There are multiple types of notes: tap notes, hold notes, and motion notes triggered by moving the breadboard up/down on the table. Visual feedback is provided using LEDs, where the color represents the accuracy. \
14
-
Every hit note fills up the color match progress bar. Once the bar is full, the game enters a special mode called "Color Match". In this mode, the player needs to match the color of the LEDs with those shown on the screen using RGB channels. Failing to finish the game mode successfully will make the player lose one life. The player starts with three lives and can replenish one after completing a song. \
13
+
Rhythm game follows the standard mechanics of this genre: the player needs to hit the notes at the right time using the buttons on the breadboard. There are multiple types of notes: tap notes, hold notes, and motion notes triggered by moving the breadboard up/down on the table. Visual feedback is provided using RGB LEDs, where the color represents the accuracy. \
14
+
The player needs to accumulate a certain number of hit notes within the time limit to trigger the special game mode called "Color Match". Failing to trigger this game mode will make the player lose one life. In this mode, the user needs to match the color of the RGB LEDs with those shown on the screen using RGB channels. Failing to finish the game mode successfully will deduct one life. The player starts with three lives and can replenish one after completing a song. The player wins when all songs in the current playlist are completed successfully. \
15
15
The game is accompanied by music, and players can customize which set tracks are playing and in what order.
16
16
17
17
## Motivation
@@ -20,7 +20,7 @@ I chose this project because I like rhythm games. Combining them with hardware w
20
20
21
21
## Architecture
22
22
23
-

23
+

24
24
25
25
Main components:
26
26
@@ -42,12 +42,12 @@ Main components:
42
42
- communicates through I2C
43
43
44
44
*Feedback*:
45
-
-**LEDs**
45
+
-**RGB LEDs**
46
46
- hit accuracy visual feedback
47
47
- controlled via PWM pins
48
48
-**Servomotor**
49
-
- color match progress bar visual feedback
50
-
- when it reaches 180° it means the bar is full
49
+
- color match progress visual feedback
50
+
- when it reaches 180° it means the color match progress is 100%
51
51
- controlled via PWM pins
52
52
53
53
*Music*:
@@ -66,7 +66,77 @@ Main components:
66
66
67
67
I wrote the initial documentation.
68
68
69
+
### Week 20 - 26 April
69
70
71
+
I tested the functionality of the components.
72
+
73
+
### Week 27 April - 3 May
74
+
75
+
I implemented the UI interface and the button logic.
76
+
77
+
### Week 4 - 10 May
78
+
79
+
I wrote the logic for the rhythm game and color match.
80
+
81
+
### Week 11 - 17 May
82
+
83
+
I integrated the music and sounds effects into the game and wrote the logic for the volume and playlist menu.
84
+
85
+
## Week 18 - 24 May
86
+
87
+
I made multiple tests to ensure the game is working properly and calibrated game parameters to ensure the gameplay experience is smooth.
88
+
89
+
## Hardware
90
+
91
+
The project uses the STM32 Nucleo Board as the main controller. An LCD Display is used for rendering the game graphics. User input is taken using push buttons. While in game, visual feedback is given using RGB LEDs for hit accuracy, and a servomotor for color match progress. The music is played using a DFPlayer Mini that has a microSD card and a speaker. A passive buzzer is used for sound effects. The motion notes are detected using a gyroscope.
| DFPlayer Mini TF-16P | Audio player for the music tracks |[18,03 RON](https://www.emag.ro/modul-tf-16p-dfplayer-mini-player-audio-24-biti-32-gb-negru-auriu-5904162801930/pd/D8B8KLMBM/)|
109
+
| Speaker | Audio output for the music tracks |[< 19,68 RON](https://www.emag.ro/modul-inregistrare-redare-audio-isd1820-cu-difuzor-3-5v-3-b-044/pd/DLXDNLMBM/)|
110
+
| MicroSD Card | Storing music files |[29,98 RON](https://www.emag.ro/card-de-memorie-microsd-premium-32-gb-hc-i-class-10-qeno-100mb-s-pentru-camera-auto-telefon-aparat-foto-hub-console-negru-card32gb/pd/DBTYN2YBM/)|
|[embassy-stm32](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32)| Hardware Abstraction Layer for STM32 | Used for control of GPIO, SPI, I2C, UART, and PWM peripherals |
119
+
|[embassy-executor](https://github.com/embassy-rs/embassy/tree/main/embassy-executor)| Async task executor | Used to manage concurrent tasks |
120
+
|[embedded-hal](https://github.com/rust-embedded/embedded-hal)| Hardware abstraction traits | Used for interacting with peripherals |
121
+
|[defmt](https://github.com/knurling-rs/defmt)| Logging framework | Used for debugging |
122
+
|[panic-probe](https://github.com/knurling-rs/probe-run/tree/main)| Panic handler | Used for monitoring fatal code errors |
123
+
|[embassy-time](https://github.com/embassy-rs/embassy/tree/main/embassy-time)| Timekeeping, delays and timeouts | Used for calculating game time |
124
+
|[embassy-sync](https://github.com/embassy-rs/embassy/tree/main/embassy-sync)| Synchronization primitives and data structures with async support | Used for managing signals and channels |
125
+
|[heapless](https://github.com/rust-embedded/heapless)| Data structures that don't require dynamic memory allocation | Used to store game data in vectors |
126
+
|[core](https://github.com/rust-lang/rust/tree/main/library/core)| Rust standard library | Used for debug and write operations |
127
+
|[mipidsi](https://github.com/almindor/mipidsi)| Display driver for ILI9341 | Used for connecting the screen via SPI |
128
+
|[embedded-graphics](https://github.com/embedded-graphics/embedded-graphics)| 2D graphics library | Used for drawing the game graphics |
129
+
130
+
131
+

132
+
133
+
The game runs in a continuous loop where it checks the current game state:
134
+
-*Start Menu*: the user chooses the next game state from the available options
135
+
-*Volume Menu*: the user can adjust the volume level of the music and turn on/off the sound effects
136
+
-*Playlist menu*: the user can edit the songs and their playback order during the game
137
+
-*Rhythm game*: the user is in a game; the game state switches to color mode when the color mode progress reaches 100%, to start menu when a game is won/lost and again to rhythm game when a song, excepting the last one, is completed
138
+
-*Color mode*: the user is in color mode; the game state switches to rhythm game after succesful completion or if the player is not out of lives after failing to complete the mode; if the player is out of lives, the game state switches to start menu
139
+
-*Exit*: the program stops after the user chooses this option
0 commit comments