Skip to main content
Version: FILS English

Zhàdàn

A game about solving puzzles to defuse a bomb.

info

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

Bomb

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

Kicad

Bill of Materials

DeviceUsagePrice
STM32 NUCLEO-U545RE-QThe microcontroller125 RON
SN74LS20N4:1 Nand Gate10 RON
SN74LS04NNot Gate3,5 RON
Square ButtonsButtons0,92 RON
Led Display TM16377 segment display8,99 RON
Temperature Sensor DHT11For the temperature module4,65 RON
Green LEDFor the solved modules0,26 RON
Active BuzzerFor sound0,99 RON

Software

LibraryDescriptionUsage
tm1637Display driver for the TM1637 chipTranslates game time into 7-segment LED patterns.
embedded-halStandard hardware interfaces for Rust.Provides the "rules" for pin and timer interaction.
embassy-syncMutex, Channel for shared state between tasksShared MISTAKE_COUNT, SOLVED_COUNT, GAME_OVER, the buzzer sound queue, and the display message between tasks safely
embassy-executorAsync task runtimeRan all 5 module tasks plus the game supervisor at the same time on the single core
embassy-futuresFor concurrent async operationsLet the morse blinker and button listener run concurrently inside one task, and let the sequence module wait on 4 buttons at once
cortex-mUsed to intentionally trigger an Undefined Instruction exceptionProvided the busy-wait delay at startup and the udf instruction that halts the chip cleanly when the game ends
cortex-m-rtStartup/reset handler, interrupt vector tableSet up the chip's interrupt table and reset handler so the program starts correctly after flashing
dht-sensorProtocol DriverDecodes the digital pulses from the DHT11 into temperature
embassy-stm32STM32-specific hardware implementation.Controls the actual physical pins on the Nucleo U545.
embassy-timeHigh-precision timekeeping library for embedded systems.Manages the 5:00 countdown and handles the variable "tick" speed based on mistakes.
heaplessStatic StorageStores the list of Morse words without needing a heap
  1. Inspiration for the manual
  2. For a better understanding of the game