CamChess is a free open source program that enables you to play against a
computer with a standard tournament board and pieces. It uses a camera to identify moves on the board. It is optimised for a vinyl roll up board with green squares and black and
"light wood" coloured plastic pieces. I got mine from
Chess Direct, but I
expect that there are other suppliers. I am using a Raspberry Pi
Zero with an attached ZeroCam to capture board images. I fixed
them to a door frame with sticky tape. The Pi Zero sends the board images to a more conveniently placed Raspberry Pi 4B. You can also use a different computer running Linux, Windows or MacOS. I used WiFi for my initial testing, but I found it was much better to set up the Zero as an Ethernet gadget, and connect to my desktop computer via a USB cable (which carries both data and power).
The ZeroCam overlooks the chess board. The board is offset to the side so that
I can get through the door. That nonetheless requires a Ministry of
Silly Walks manoeuvre. That is not inappropriate because CamChess is
written in Python.
I make a move on the board, and press the space bar on a keyboard. The camera
takes a picture of the chess board and sends it to a desktop PC which
identifies the move and displays its reply on a screen.
I make the computer's move on the board, work out my reply and press the space bar again. The source code for CamChess is available here.
Great! Next step... a robot arm to move the chess pieces
ReplyDeleteThe Raspberry Turk already does that.
ReplyDelete