Skip to main content
Version: FILS English

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:

Architecture

Game Loop:

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​

KiCad Schematics

Bill of Materials​

DeviceUsagePrice
Raspberry Pi Pico 2WThe microcontroller40 RON
SPI LCD ModuleThe Display70 RON
MPR121 Module with KeypadCapacitive Touch Sensor30 RON
Active Buzzer ModuleUsed to signal touch5 RON

Software​

LibraryDescriptionUsage
ili9341A platform agnostic driver to interface with the ILI9341Used for controlling the display
embedded-graphics2D graphics libraryUsed for drawing to the display
embedded-allocEmbedded AllocatorUsed for memory allocation
mpr121-halMPR121 DriverUsed for getting input from Keyboard
embedded-canvas 2D Canvas LibraryUsed for more complex drawing
  1. Creating a Chess Engine in Python