index
#Minesweeper Minesweeper implementat in rust.
Author: Cretu Tudor-Andrei
GitHub Project Link: https://github.com/UPB-PMRust-Students/proiect-TudorKsan
Description
The project is a portable minesweeper implementation in rust, using a raspberry pi pico microcontroller. The game has multiple dificulty levels and is designed
Motivation
I decided to implement this game as I was always fascinated by it. While browser versions are available, the game is very hard to play without a mouse, and even harder on a portable devide like a phone. This small portable game aims to solve the problem, using 6 buttons to control the game and a small display to be able to see game.
Arhitecture
Log
Week 28 April - 4 May
Bought the pieces, drawn the KiCad diagram and finished the implementation
Week 5 - 11 May
First iteration of the build using a breadboard to connect all the components
Initial testing of the components
Week 12 - 18 May
Final hardware design
First iteration of the software part
Week 19 - 25 May
Final version of the software, finished game
Hardware
As the main hardware part I used the Raspberry Pi Pico 2W to create the game. For displaying the game I chose a 1.8" SPI LCD, which should be enough to see the game in both dificulties. 6 buttons are used for gameplay, with 4 of them being used for the 4 movement directions, 1 used for placing the flag on the mines, and the last one is used for checking the slots for mines.
Schematics
Bill of materials
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | The basis of the project | 40 ron |
Lcd SPI 128x160 | LCD for displaying the game | 44 RON |
Cables | Used for connecting the buttons to the controller | 6 RON |
Breadboard 400 points | Used for ease of connection | 5 RON |
Butoane | 6 buttons for controlling the game | 2 RON |
Rezistente | 6 rezistors for the 6 buttons | 1 RON |
Software
Library | Description | Usage |
---|---|---|
embassy-rs | Rust framework | Used for writing the software |
st7789 | Display driver | Used to connect the display |
embedded-graphics | 2D graphics library | Used to generate the images for the display |