The Hangmaster
A hangman game programmed on a Raspberry Pi Pico.
Author: Munteanu Amalia-Nicole
GitHub Project Link: https://github.com/UPB-FILS-MA/project-nikkoxp
Description
My project is based on an old timey game that we all used to play during school hours and even in our free time with our friends, the hangman. The game's purpose is to crrate a fun enviroment in which people can relax and rewind old memories from their childhood. The player is given a word and must guess the letters it consists of. For example, if a player choose a letter which is part of the chosen word, the positions of the letter will be revealed to the player. However, if the letter is not part of the word, a red LED will light up. When all 3 LEDs on the breadboard are lit up, the player has lost, and the game is over and a buzzer will go off. The game will be able to function on a Raspberry Pi, using a LCD display which uses Embeded-graphics, a buzzer, a keypad, a potentiometer, 3 LEDs and a button for starting the game and stopping it.
Motivation
I've always taken a big interest in the game development area, and thought it would be fun to try challenging myself by coding a game designed to work on a microprocessor in a newly encountered programming language, rust. The question was which game. Well, it all came around when one day, during free hours, my friends and I decided to play Hangman and thought it would be a great idea to revolve my project on this timeless game.
Architecture
Log
Week 6 - 12 May
- Placed an order for the necessary components and picked them up from the shop.
- Made a prototype of my project using schematics and started to play around with the hardware part, figuring out the places of my components.
Week 7 - 19 May
- This week I was able to finish the Hardware of my project and create the schematics of it using Kicad.
- I started working on the software part of my project.
- desgined the schematics of the LCD and the Keypad in kicad.
- Started designing a shell in which I would be able to place my hardware and make it look more appealing to the public, by hiding the wires and the components such as the pico and buzzers.
Week 20 - 26 May
- Finished the software and due to a faulty component had to remake the whole hardware design and software.
Hardware
- Raspberry Pi Pico W: A microcontroller board for the embedded project.
- LCD Display: A 16x2 character LCD display with I2C interface and blue backlight.
- Wires father-father: Male-to-male jumper wires for connecting components on a breadboard or elsewhere.
- Wires mother-mother: Female-to-female jumper wires for connecting components on a breadboard or elsewhere.
- Buzzer: An audio output device that emits sound when activated once the player loses all the lives.
- Keypad: A 4x4 matrix keypad for inputting the letters.
- Breadboard: A breadboard for prototyping the circuit necessary for the project.
- 3 LEDs: 3 red LEDs with diffused lens for visual indication.
- Buton 6x6x6: A tactile push button for manual control or input.
Schematics
Bill of Materials
Device | Usage | Price |
---|---|---|
Rapspberry Pi Pico W | The microcontroller | 35 RON |
LCD 1602 cu Interfata I2C si Backlight Albastru | The Display | 16,34 RON |
Wires father-father | The Wires Father-Father | 6,99 RON |
Wires mother-mother | The Wires Mother-Mother | 7,73 RON |
Buzzer | The Buzzer | 1,95 RON |
Keypad | The Keypad | 3,99 RON |
Breadboard | The Breadboard | 9,98 RON |
3 Red LEDs | The LEDs | 0,39 RON |
Button 6x6x6 | The On/Off Button | 0,36 RON |
Software
Library | Description | Usage |
---|---|---|
st7789 | Display driver for ST7789 | Used for the display for the Pico Explorer Base |
embedded-graphics | 2D graphics library | Used for drawing to the display |