I recently set up my Novag Citrine, and connected it to my desktop PC, which is running Xubuntu 20.04 (a flavour of Ubuntu Linux). My PC has an integrated serial port, so I used that. I found the serial port with:
dmesg | grep tty
[ 0.074100] printk: console [tty0] enabled
[ 0.364954] 00:06: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
It was ttyS0.
Initially, I had to run CuteCom using:
sudo cutecom
I selected 57600 Baud, keeping 8 Data bits and 1 Stop bit. I left the Handshake boxes unticked. I found that I also needed to select "CR.LF".
I tried to run the first Python program that I posted in this blog. It was unable to access the serial port. I fixed that with:
sudo chmod 666 /dev/ttyS0
(666 means that anyone can read and write, but not execute.) I no longer needed sudo to launch CuteCom from the terminal, and was able to run the simple Python program with no trouble.
I hit problems when I tried to run the more complicated Citrine interface program. The python-chess module had changed. I fixed the problems, and made several enhancements, some of which will be described in subsequent posts. Here is the latest Python code.
My computer desk was now very crowded with the Citrine in place. The Citrine was not at all convenient to use in that location, but I had a solution in mind.
No comments:
Post a Comment