Thursday 5 November 2020

Running the Citrine Interface on the Zero


I was able to install Stockfish 9.2, Ethereal, Fruit, Toga II and Gnuchess on the Raspberry Pi Zero W using Add / Remove Software. These engines were all available in the repository. It is possible to install additional engines by compiling from source code. Lc0 has instructions for compiling and installing the engine on a Raspberry Pi.

I found the location of the Stockfish executable by opening a terminal on the Zero and typing:

which stockfish

Stockfish and the other engines were in the /usr/games directory.

I copied my Novag Citrine interface program to the home directory of the Zero from a terminal on my desktop computer:

scp ~/Python/CitrinePi.py pi@<ip_address>:/home/pi

I opened an SSH session from my main computer and created a .fonts directory in the Zero's home directory, and copied the fixed version of the Chess Alpha font to that directory:

ssh pi@<ip_address>
mkdir ~/.fonts
exit
scp ~/.fonts/Alpha.ttf pi@ip_address:/home/pi/.fonts

I installed python-chess by typing by opening a terminal on the Zero and typing:

sudo pip3 install python-chess

I connected the Zero to the Citrine using my USB to serial converter. Since I was no longer using an integrated serial port, I had to change the serial port back to /dev/ttyUSB0 in the Python code. Everything seemed to work. I was able to connect to Stockfish and the other engines in /usr/games. The program took a few seconds to start up, but was very fast after that.

No comments:

Post a Comment