Skip to content

a113ssa/embedded-rust-guessing-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Guessing Game

Game flow

  • App generates a random number between 1 and 100
  • User submits guesses via a remote control
  • System provides feedback on whether the guess is higher or lower than the target
  • "Victory" title is displayed once the correct number is found
  • User presses "restart" button to start new game

Guessing Game implementation using

  • Rust
  • Embassy
  • STM32L476RG
  • LCD with I2C adapter
  • "Car mp3" remote control
  • IR receiver

Before run:

$ rustup target add thumbv7em-none-eabihf

IR connection

IR pin STM32 pin
Output PA0 (A0)
VCC +3V3
GND GND

LCD connection

LCD pin STM32 pin
SDA SDA/D14/PB9
SCL SCL/D15/PB8
VCC +3V3
GND GND

STM32 pin reference

Screenshot are taken from here.

Car mp3 remote control

Run program

  • Connect microcontroller to PC and run cargo run
  • Use "Car mp3" remote controller to interact with application by pressing 0-9 buttons, use >>| button to submit answer and |<< button to erase last digit, >|| to restart the game.

Demo

Watch demo video on Youtube


Cherry-picked from https://github.com/a113ssa/stm32-setup/tree/main/guessing_game and improved here

About

Guessing Game implementation using Embedded Rust with STM32L476RG, IR receiver, Car MP3 remote control and LCD with I2C adapter

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages