6. Lights, camera, action ...

Lights

You need an even source of light placed over the board. I use this one, which is really cheap, from amazon.co.uk - and no doubt there is something similar on amazon.com. With the room lights switched off.

Camera

No doubt you can use the special Raspberry Pi camera module (with a long cable), but I use a USB camera - Logitech 960-001064 C525 HD Webcam- Black which works with the RPi. You need to ensure that the camera does not move with respect to the board, by building a tower or having somewhere to fix it firmly. I have the camera 58 cm above the board. This reduces geometric distortion.

Table

You need a sturdy one. I bought this one. On top of that you can see I have a square of MDF, with some stuff to stop the robot jumping around when the trolley moves. It's a good idea to keep the camera in the same position over the board!

Keyboard

The RPi needs a USB keyboard for its first setup. And I use that for developing the code. The only thing the robot needs a keyboard for is to start the program and to simulate hitting the chess clock. I got one of these. But really, you only need a mouse or a button GPIO-connected to the RPi.

Display

I use a big screen for development, but the only things the robot needs is to tell you your move is invalid, check, etc. I got one of these, also available at amazon.com.

But it would be better for the robot to speak these things! These can be done by converting text to speech as described here.

Phrases the robot needs to say:

Check!
Checkmate
Invalid move
You won!
Stalemate
Draw by threefold repetition
Draw by 50 moves rule

The fifty-move rule in chess states that a player can claim a draw if no capture has been made and no pawn has been moved in the last fifty moves (for this purpose a "move" consists of a player completing their turn followed by the opponent completing their turn).

No comments:

Post a Comment

Intro

I have built a chess robot using Lego and Raspberry Pi . I have placed an improved description of the robot at  Chess Robot Made With LEGO...