Pages

Thursday, September 27, 2012

SishFishPiv2

SishFishPiv2

 

This video shows the bulk of it. The SishFishPi is getting much closer, dare I say it's a "2.0" at this point.

It's now capable of playing a game, with fully functional basic clocks, against stockfish, and updates an embedded web server with the game content in realtime!

There's still more to do, I need to get the web server fleshed out so you can use it to set the game parameters, things like:

- Player vs Computer or Player vs Player

- Downloading your pgn files of past games

- Setting clock times, labels for players, etc.

I also need to get the entire code base packaged up in a nice installation package such that it can be installed on any RaspberryPi System.

Lastly I need to get a the new "sishfish" chessboard hex files uploaded and available for the Minimus, Teensy, and Teensy++.

Exciting times ahead.

hz

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

Friday, September 14, 2012

New hardware from a friend in need

Exciting news today for those of you interested in using something other than the Teensy for your Sish board, we've now got another option, the Minimus AVR board.

How did this come about? It's an interesting story. Seems one of my readers from the UK was very interested in trying out a Sish board of his own, however it was very difficult to get a Teensy in the UK for a reasonable price (having ordered Raspberry Pi's from the UK I understand the frustration).

Simply put he asked if the Minimus AVR board would be a suitable replacement. Seeing as it was another ATMEL chip I figured it would work fine, but would have to make a few adjustments to get a good build working.

Unbelievably he offered to send me two test boards (one backup just in case of emergency) in exchange for building a functional hex file for the Minimus. He packed up the devices and shipped them to me Royal Air Mail and we waited...a very long time! Almost a month later the postman dropped off two shiny Minimus AVR units and it was time for me to hold up my end of the bargin.

So I set to work this evening getting the code adjusted and tested. In the end it took a few tweaks and updates, but here's a link to the Wiring Diagram for a minimus Sish board, as well as the hex file for the minimus-sish (see the side panel).

Thanks again for sharing those boards with me, I really appreciate it.

Lastly, before I forget, the ATMEL/Minimus needs a FLIP program to install the hex file.

http://www.atmel.com/tools/FLIP.aspx -> Download the first FLIP program from the list of options, you will need the Java Runtime if you don't already have it installed.

Follow the instructions in this PDF to install a hex file and put the Minimus in "programming" mode.

http://www.minimususb.com/minimus_v14.pdf

Lastly, your computer (if it's Windows 7) most likely won't have the drivers for the device, so you'll want to install these drivers following the instructions in the prior pdf.

http://www.minimususb.com/files/minimus_x64_drivers.rar

If you have a different board you'd like to see about getting a Sish built for let me know, perhaps we can work the same deal again!

-hz

Friday, September 7, 2012

Success!

I now have a functional SishFishPi!

It's still pretty simple today, however it can talk to the sish board (using a new hex file) and send the Stockfish moves to the LCD.

It's not the most visually appealing setup at this point, but now that I've got it working the breadboard will come out and I'll start working on wiring up this LCD cleaner. For now I can't begin to tell you how fun this was to play with this evening.

Still exploring options for displaying the game on an embedded web server on the Pi, and looking at how I can possibly modify the software further to show the clock, handle promotions, and start a new game cleanly.

As always lots to do, but it's high time I posted some pictures.

 
The above photo shows the breadboard and Raspberry Pi setup. The Pi is in a sweet case from Built to Spec. It rocks. 

 
There's stockfish's move from the Pi, it's on the LCD screen, I'm sorry but that's just so cool.

 
This should give you an idea of the commandline output on the sishfishpi, think of this as the debug information, when I'm done you won't have to connect to this interface unless you want to.
 
 
Lots to think about still, in order of preference here's what I'm working on right now.
 
1. Signaling start of a new game, I'm trying to avoid wiring another button up to the Teensy, but I at this point I haven't come up with a better plan than that.
 
2. Coding in promotions, I'm thinking you'll have to promote by moving the pawn to the 8th rank, then the SishFishPi will prompt you with "Promotion to?", then you'll press the square of what you are promoting to (d1,c1,b1,a1 -> Queen,Bishop,Knight,Rook) opposite if you are black of course.
 
3. Game Saving. The SishFishPi needs to save your game in pgn format and make in available on an embedded web server.
 
4. Game Display (in realtime) The SishFishPi also needs to show the game in realtime as we progress through it via an embedded web server.
 
That's about all I've got at present. I'll explore Git and look at making a repository for this stuff in the near term, or at least posting an SD card image for the Pi and the hex file for the Sish board once I get further along.
 
Thanks!
 
hz

Monday, September 3, 2012

Back at it, working with Raspberry Pi and LCDs

Sorry it's taken so long to get back to this, however as you can expect building electronic chess boards is not my full time occupation! :)

I can tell you however that I've carved out a little time over the last few weeks and have a couple of additional builds in process, there's no new hex files to share yet, but let me tell you what's in the works.

Sishnovag


After working closely with Bryan @ USB Chessboards I started reviewing the Novag Citrine protocol, especially how it interacts with the Arena Windows Chess application. As such I now have a "sishnovag" build that speaks serial commands to Arena and receives move responses. The goal here is to next wire up an LCD to the Sish and get it to output the moves provided by Arena on that LCD. If this works we'd never have to look at the computer screen! So far I've got the hex file sending moves to Arena just fine, however I'll have to wait until later in the week when I get my LCDs from Sparkfun.com.

Sishfish


I've got a Raspberry Pi! Yes I was one of those crazies that ordered the extremely cheap development board earlier this year and now have it sitting on my desk. I was able to put together a new sish build that speaks raw HID to the Raspberry Pi. This build which I'm calling "sishfish" is being designed to talk to Stockfish on the Pi. Again it's my hope that I can readily wire an LCD to the Raspberry Pi and get move output from Stockfish straight to the LCD. In a perfect world I'd get a mini-webserver up on the Raspberry Pi that would show the game in realtime, but that's a project for another day.

Just wanted to share that with you all, also if you have built a sish board please tell me, I'd like to get a gallery going here for Sish boards and their makers. :)

Thanks all!

-hz