-
Notifications
You must be signed in to change notification settings - Fork 525
Project/zackhary lei.de #878
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ZackharyLei
wants to merge
6
commits into
UPB-PMRust:main
Choose a base branch
from
ZackharyLei:project/zackhary_lei.de
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c3b29c3
Add index.md file
ZackharyLei 96b0910
Update project description and schematic note
ZackharyLei d405ee0
Update GitHub project link based on review
ZackharyLei 962af66
Add schematic and hardware photos
ZackharyLei 93ae902
Update schematic to SVG format
ZackharyLei 8451c71
delete schematic.webp
ZackharyLei File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
website/versioned_docs/version-fils_en/project/2026/zackhary_lei.de/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| # Steady-Hand Maze Challenge | ||
| A challenge of skill: navigate a metal loop through a wire maze without touching the wire with high-score tracking and profile management. | ||
|
|
||
|
|
||
|
|
||
| **Author**: Zackhary Lei Juanes De Vega \ | ||
| **GitHub Project Link**: [(https://github.com/ZackharyLei)] | ||
|
|
||
| ## Description | ||
|
|
||
| The project is an interactive,"Steady-Hand Maze" game. A metal loop must travel along a bent copper wire track without touching it. If the loop touches the wire, an active buzzer sounds. The project features an OLED display for menu navigation and to show remaining lives and a timer, a rotary encoder for profile selection/game control, and an SD card module to save high scores and player profiles. The firmware is written in Rust, utilizing the Embassy framework for efficient multitasking and handling of game logic, timing, and collision detection. | ||
|
|
||
|
|
||
| ## Motivation | ||
|
|
||
| I chose this project to gain hands-on experience with embedded systems development in Rust. It provides a perfect balance between hardware interaction (interrupts, GPIO, SPI/I2C protocols) and software logic (state machines, file system management on SD cards, and graphics rendering). It serves as a practical application of real-time sensor processing and user interface design. | ||
|
|
||
| ## Architecture | ||
|
|
||
| The system relies on the STM32 Nucleo as the central processor. | ||
| - **Input System**: A Rotary Encoder captures user navigation (for menus) and a touch-sensor (the copper wire) captures game events via GPIO interrupts. | ||
| - **Control Logic**: The main loop manages the game state (Menu, Playing, GameOver, ScoreBoard). | ||
| - **Output System**: The OLED display provides visual feedback (UI/Graphics), and the Active Buzzer provides auditory feedback. | ||
| - **Storage System**: The SD Card module stores user profiles and persistent high-score data via SPI. | ||
|
|
||
| ## Log | ||
|
|
||
| ### Week 5 - 11 May | ||
| - Project planning, component sourcing, and setting up the Rust toolchain for STM32. | ||
|
|
||
| ### Week 12 - 18 May | ||
|
|
||
|
|
||
| ### Week 19 - 25 May | ||
|
|
||
|
|
||
| ## Hardware | ||
|
|
||
| The project uses an STM32 Nucleo board as the microcontroller. User interaction is handled by a KY-040 rotary encoder and a custom-bent copper wire track. Feedback is provided via a 0.96" OLED display and an active 5V buzzer. All data is saved on a microSD card via an SPI module. | ||
|
|
||
| ### Schematics | ||
|
|
||
| *(To be uploaded upon completion of the circuit diagram)* | ||
|
|
||
| ### Bill of Materials | ||
|
|
||
| | Device | Usage | Price | | ||
| |--------|--------|-------| | ||
| | [STM32 Nucleo](https://www.st.com/en/evaluation-tools/stm32-nucleo-64.html) | The microcontroller | 0 RON (Borrowed) | | ||
| | [OLED Display 128x64 I2C](https://www.optimusdigital.ro/) | UI and game feedback | 19 RON | | ||
| | [MicroSD Card Module SPI](https://www.optimusdigital.ro/) | SPI interface board | 10 RON | | ||
| | [MicroSD Card](https://www.optimusdigital.ro/) | Data storage | 18 RON | | ||
| | [KY-040 Rotary Encoder](https://www.optimusdigital.ro/) | Menu navigation | 8 RON | | ||
| | [Active Buzzer 5V](https://www.optimusdigital.ro/) | Game fail alarm | 2 RON | | ||
| | [Breadboard](https://www.optimusdigital.ro/) | Prototyping circuit connections | 20 RON | | ||
| | [Jumper Wires](https://www.optimusdigital.ro/) | Connecting components to Nucleo | 5 RON | | ||
| | [220-ohm Resistors](https://www.optimusdigital.ro/) | Current limiting for buzzer | 2 RON | | ||
| | [Copper Wire (Unifilar)](https://www.dedeman.ro/) | The maze track | 15 RON | | ||
|
|
||
|
|
||
| ## Software | ||
|
|
||
| | Library | Description | Usage | | ||
| |---------|-------------|-------| | ||
| | [stm32f4xx-hal](https://github.com/stm32-rs/stm32f4xx-hal) | Hardware Abstraction Layer | Pin/Clock/Bus management | | ||
| | [ssd1306](https://github.com/jamwaffles/ssd1306) | OLED Display driver | Drawing the UI and game text | | ||
| | [embedded-graphics](https://github.com/embedded-graphics/embedded-graphics) | 2D graphics library | Shapes and fonts for the screen | | ||
| | [embedded-sdmmc](https://github.com/rust-embedded-community/embedded-sdmmc-rs) | SD Card FAT32 driver | Saving and loading scores | | ||
|
|
||
| ## Links | ||
|
|
||
| 1. [The Embedded Rust Book](https://docs.rust-embedded.org/book/) | ||
| 2. [STM32 Nucleo Documentation](https://www.st.com/en/evaluation-tools/stm32-nucleo-64.html) | ||
| 3. [SSD1306 Display Crate Docs](https://docs.rs/ssd1306/latest/ssd1306/) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add here the link from the repository generated by accepting the assignment.