Embedded Chess
Chess engine and game running on a fully embedded system.
info
Author: Oprea IonuΘ-Georgian
GitHub Project Link: https://github.com/UPB-PMRust-Students/project-mas-vi
Descriptionβ
A chess engine and game running on the Pico that users can play on a LCD display using a keyboard:
- The game uses the display to allow the users to select the game mode: Player vs Player or Player vs AI.
- The chess engine provided the validation and move generation AIs.
- A buzzer is used to serve different information about the cursor movement and piece and menu selections.
Motivationβ
I choose this project as I am passionate about chess and wanted to see the extent to which a chess engine could run on a mirco controller. I knew this involved a lot of optimization and wanted to take the challange.
Architectureβ
Architecture:
Game Loop:
Logβ
Week 6 - 12 Mayβ
Week 7 - 19 Mayβ
Week 20 - 26 Mayβ
Hardwareβ
For the project, the following were used:
- A Raspberry Pi Pico 2W for controlling the Display(Drawing to it), the MPR Keyboard Module(Getting input), the Active Buzzer Module and running the game loop and Chess Engine.
- The ILI9341 LCD 240x320 Display was used to provide the user with the game GUI.
- The MPR121 Keyboard Module provided the used input for piece movement and game mode selection.
- The active buzzer was intented to offer an acustic signal to confirm keyboard press.
Schematicsβ
Bill of Materialsβ
Device | Usage | Price |
---|---|---|
Raspberry Pi Pico 2W | The microcontroller | 40 RON |
SPI LCD Module | The Display | 70 RON |
MPR121 Module with Keypad | Capacitive Touch Sensor | 30 RON |
Active Buzzer Module | Used to signal touch | 5 RON |
Softwareβ
Library | Description | Usage |
---|---|---|
ili9341 | A platform agnostic driver to interface with the ILI9341 | Used for controlling the display |
embedded-graphics | 2D graphics library | Used for drawing to the display |
embedded-alloc | Embedded Allocator | Used for memory allocation |
mpr121-hal | MPR121 Driver | Used for getting input from Keyboard |
embedded-canvas | 2D Canvas Library | Used for more complex drawing |