Wordle
A Rust-based embedded implementation of the popular word-guessing game.
Author: Suliman Edis
GitHub Project Link:https://github.com/UPB-PMRust-Students/proiect-Edis9955
Description
The project replicates the popular Wordle game developed by the New York Times, implemented using Rust on embedded hardware. Players must guess a secret 5-letter English word in 6 tries, receiving feedback on each guess through color-coded hints:
Green: Correct letter in the correct position
Yellow: Correct letter in the wrong position
Gray: Letter not in the word
Motivation
This project is a nice first dip into the world of embedded systems. Wordle is a simple but engaging game, making it a great candidate to explore user interaction on low-power hardware while familirizing myself with Rust in an embedded environment.
Architecture
The core components of the project architecture include:
Game Engine (Rust): Handles word selection, guess evaluation, and game logic.
Input Handler: Receives user input from a connected keypad.
Display Driver: Outputs the game state on an LCD using color indicators. Architecture Overview:
[Keypad/Touch Input] ---> [Input Handler] | v [Game Logic Engine] | v [Display (ILI9341)]
Log
Week 5 - 11 May
Week 12 - 18 May
hardware acquisition debugger wiring and testing display wiring keypad wiring kicad schematic redo display wiring
Week 19 - 25 May
code writing display testing keypad testing keypad implmetnation to write letters
Hardware
The project is built on a Raspberry Pi Pico platform with peripheral components for input, output, and storage. The display provides visual feedback while the keypad serves as the main input method.
Schematics
Bill of Materials
astatura matriceala 4x4
Device | Usage | Price |
---|---|---|
2 x Raspberry Pi Pico 2W | The microcontroller | 79 RON |
Raspberry Pi Ecran LCD ILI9341 | Display | 67 RON |
Breadboard | 2 x Breadboard | 7 RON |
4x4 input keypad | keypad | 7 RON |
wires | wires for breadboard | 8 RON |
mother-father wires | wires for display | RON |
usb cable | cable | 7 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 |
rand | Random number generation | Random word selection |
colored | Terminal color output | Color-coding of letters |
display_interface_spi | Inteface for display | using the display |
display_interface_spi