Zhàdàn
A game about solving puzzles to defuse a bomb.
Author: Druică Denisa-Adina
GitHub Project Link: (https://github.com/UPB-PMRust-Students/fils-project-2026-Adinusha)
Description
This is a game where you have to solve different puzzles, but I will refer to them as modules, in order to successfully defuse the bomb. Failing to do so will result in the "detonation" of the bomb and failing the game.
Motivation
The motivation for this project came from my passion for gaming and technology. I wanted to blend these two in one place and create something that can be used in a fun and relaxing way.
Architecture
Log
Week 5 - 11 May
Started working on the 3D design for the bomb and started searching for other libraries that I could use for the project.
Week 12 - 18 May
Connected all the components using the Kicad scheme and I also made some small analog connectivities in order to test if the hardware was working.
Week 19 - 25 May
I finished connecting all the hardware and started working on implementing them in the 3d build.
Hardware
The STM32 Nucleo-U545RE-Q acts as the high-performance "brain" managing the game logic and countdown, while the TM1637 Display provides the visual timer and the DHT11 Sensor handles the interactive heat-defusal module. User inputs are captured via Square Buttons and a Green LED signals successful module completion, with an Active Buzzer providing audible strikes or explosion alerts. Finally, the SN74LS21DR AND Gate and SN74LS04N NOT Gate provide a hard-wired physical logic layer for the wire-cutting module, ensuring the circuit is only validated when the specific "correct" wire is disconnected.
Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32 NUCLEO-U545RE-Q | The microcontroller | 125 RON |
| SN74LS20N | 4:1 Nand Gate | 10 RON |
| SN74LS04N | Not Gate | 3,5 RON |
| Square Buttons | Buttons | 0,92 RON |
| Led Display TM1637 | 7 segment display | 8,99 RON |
| Temperature Sensor DHT11 | For the temperature module | 4,65 RON |
| Green LED | For the solved modules | 0,26 RON |
| Active Buzzer | For sound | 0,99 RON |
Software
| Library | Description | Usage |
|---|---|---|
| tm1637 | Display driver for the TM1637 chip | Translates game time into 7-segment LED patterns. |
| embedded-hal | Standard hardware interfaces for Rust. | Provides the "rules" for pin and timer interaction. |
| embassy-sync | Mutex, Channel for shared state between tasks | Shared MISTAKE_COUNT, SOLVED_COUNT, GAME_OVER, the buzzer sound queue, and the display message between tasks safely |
| embassy-executor | Async task runtime | Ran all 5 module tasks plus the game supervisor at the same time on the single core |
| embassy-futures | For concurrent async operations | Let the morse blinker and button listener run concurrently inside one task, and let the sequence module wait on 4 buttons at once |
| cortex-m | Used to intentionally trigger an Undefined Instruction exception | Provided the busy-wait delay at startup and the udf instruction that halts the chip cleanly when the game ends |
| cortex-m-rt | Startup/reset handler, interrupt vector table | Set up the chip's interrupt table and reset handler so the program starts correctly after flashing |
| dht-sensor | Protocol Driver | Decodes the digital pulses from the DHT11 into temperature |
| embassy-stm32 | STM32-specific hardware implementation. | Controls the actual physical pins on the Nucleo U545. |
| embassy-time | High-precision timekeeping library for embedded systems. | Manages the 5:00 countdown and handles the variable "tick" speed based on mistakes. |
| heapless | Static Storage | Stores the list of Morse words without needing a heap |