Project Sneak Peek
An AI-powered physical chessboard that detects human moves using computer vision, calculates responses using the Stockfish engine, and visualizes moves directly on the board using an LED matrix.
This system bridges the gap between physical and digital chess. It uses a camera to watch a real chessboard, processes the video feed to understand the game state, and communicates with an ESP32 microcontroller to light up LEDs on the board, guiding the player.
The following table outlines the business model for this project, detailing its value proposition, customer segments, and operational structure.

The project is divided into two main directories:
vision_part/ (The Brain)Runs on a PC/Laptop. It handles:
board_part/ (The Hardware)Runs on an ESP32 microcontroller. It handles:
Hardware:
Software:
Navigate to the folder:
cd vision_part
Install dependencies:
pip install opencv-python numpy python-chess requests
main.py:
Open main.py and update the following variables at the top:
BLYNK_AUTH: Your Blynk Auth Token.CAMERA_URL: The IP address of your camera (or 0 for USB webcam).STOCKFISH_PATH: The absolute path to your downloaded stockfish.exe.Run the Brain:
python main.py
Open the Code:
Open board_part.ino in the Arduino IDE.
Blynk by Volodymyr ShymanskyyWiFi (Built-in for ESP32)Configure Credentials: Update the top of the file with your details:
#define BLYNK_TEMPLATE_ID "YOUR_TEMPLATE_ID"
#define BLYNK_DEVICE_NAME "SmartChess"
#define BLYNK_AUTH_TOKEN "YOUR_AUTH_TOKEN" // Must match the one in Python
char ssid[] = "YOUR_WIFI_NAME";
char pass[] = "YOUR_WIFI_PASSWORD";
main.py script on your PC.This mapping assumes an 8x8 matrix where Columns (Files) are Anodes (+) and Rows (Ranks) are Cathodes (-).
| Chess File | ESP32 Pin | Chess Rank | ESP32 Pin |
|---|---|---|---|
| File A | GPIO 23 | Rank 1 | GPIO 32 |
| File B | GPIO 22 | Rank 2 | GPIO 33 |
| File C | GPIO 21 | Rank 3 | GPIO 25 |
| File D | GPIO 19 | Rank 4 | GPIO 26 |
| File E | GPIO 18 | Rank 5 | GPIO 27 |
| File F | GPIO 17 | Rank 6 | GPIO 14 |
| File G | GPIO 16 | Rank 7 | GPIO 12 |
| File H | GPIO 4 | Rank 8 | GPIO 13 |
This project was developed as part of the IoT Project coursework for the 2025-26 Fall Semester, Department of Computer Engineering, Sakarya University.