See my Blog as I go from prototype to a working board.

Chessbox is an electronic chess board and chess computer. It senses and records the movement of chess pieces on a full sized board. Using a touch screen you can set the strength of the computer, setup a game against another player, and my ultimate goal is to be able to analyse and view games stored in a PGN file. For example, load a game and step through the moves, explore variations, and return to the main line. All while being prompted what to move, or what pieces should go where. Software and schematic is open source.

Currently Chessbox is able to play a game against you as black, and records the game. The GUI runs on both Windows and on a Raspberry PI.

The name Chessbox was renamed from ChessLR in December of 2021. I had been using Java, but switched to C++ as I needed to refresh my C++ skills since I would be working on another project that utilizes C++ and SDL.

Check out a video of me playing a game against Chessbox:

Features

Features currently implemented:

Goals

Features planned but not yet implemented:

How it works

There will be sensors under the board, as well as on the pieces. In the current design, reed switches will be under each square and magnets under the pieces. Reed switches are sensitive to magnetic fields that the magnets generate, and will activate when a piece is over it. This doesn't allow for piece identification, so it doens't know if a knight or a queen is over the square. By using a little bit of clever software, it should be fairly easy to keep track of what piece is where, and what piece moved.

Hardware

As the project evolves, the schematics will be updated. At present the board will be utilizing:

Software

The driver of the board is written in C++, and controls the LEDs and senses if there is a piece on a square using the reed switches. The GUI that runs on the touch display is also written in C++ using Simple Directmedia Layer for the graphics layer.

Chess rules are implemented using a nice library at THC Chess Library.

Engine is Stockfish, but the GUI can support other engines. For example, I use Stockfish when running on my PI, but Deep Shredder when running on Windows. My UCI client makes use of Tiny Process Library to run the engine as a separate process. The communication protocol between my software and a chess engine is Universal Chess Interface (UCI).

In order to use this software, you will need to have a board built.

You can download the lastest build as well as browse previous versions. Have 2 terminals open and run the following in terminal 1:

$ cd ~/
$ wget https://8bitcoder.com/downloads/chessbox/chessbox.tar.bz2 
$ tar xjf chessbox.tar.bz2
$ cd ~/chessbox/
$ ./cbcontroller

In a second terminal run the following. The -f attempts to run full screen:

$ cd ~/chessbox/
$ ./cbgui -f

Resources



Copyright © 2020, Lee Patterson