Pages

Wednesday, September 19, 2012

SishFishPi - Getting closer

Thought it was high time to update you on the current status of the SishFishPi project.

For those just joining us, the SishFishPi project involved integrating a version of our hardware usb chessboards specially modified for talking to the Raspberry Pi (Virtual Serial Port). This new setup would allow the Pi to communicate moves from Stockfish to a simple commodity class LCD connected to the Pi's GPIO pins (general purpose i/o).

First order of business was to get the Raspberry Pi into a better case. While I work on building a case out of wood I ordered a very nice acrylic case from built-to-spec.com. Those guys do great work and if you have a Pi it's worth spending the 12$US to get a case from them.

Next I needed to get an LCD working. I purchased a number of LCDs from Sparkfun.com and from Adafruit.com. However in the end I decided to stick with the Adafruit.com LCD. It came with everything necessary to get started and was reasonably priced.

**WARNING**

The Adafruit website contains a great tutorial all about connecting the LCD to the Pi and driving it with python. While the hardware portion is great, I found the software lacking. It appears to have some consistency issues with my LCD (random crashes, garbage, etc). In the end I located the following C/C++ library and built a simple command line tool to update the screen from it.

http://www.ctheroux.com/raspberry-pi/

After I got the LCD functioning it was time to integrate it with a simple Chess engine. For this purpose I chose Stockfish. First and foremost it's open source and easy to get built for the Pi, and secondly because of it's exceptional reputation in the commnunity. Let's be honest, my chess skills are completely dwarfed by my technology skills. Stockfish will have my number for many years to come.

With all this complete, I took a few pictures to better demonstrate where we are today.

 
Using the Built-To-Spec case and wiring up an Adafruit LCD.

 
Jumper wires make life easier.

Playing with Stockfish using one of my custom made chess sets, yes I turn my own pieces.

Here's a blow up of the LCD, nice and easy to read Stockfish's move.
 
 
Lastly I started working with pgn4web. It's an amazing Javascript based web engine for broadcasting pgn games in realtime. After a few modifications to my software I was able to get it outputting moves into a live pgn file on the Pi. Then it was a simple matter of opening up my web browser and I could watch my game in real-time! Very fun stuff.
 

pgn4web showing my game in realtime!
 
Hopefully this is enough to give you an idea where I'm headed. Up next I need to get a simple web/cgi setup to handle further controlling the chess game software (restarting a game, changing settings, etc).
 
I also plan on trying my hand at a wooden case for the Pi, more on that later!
-hz

1 comments:

jimmy721 said...

Great!!! work Matt

jimmy

Post a Comment