Hi Max,
I can see that there's a potential bug in PyMata (the line that reads 'Error: Caught exception in command handler - pop from an empty deque') but I'm not going to have a chance to fix it until Friday.
In the meantime I think that you problem may be happening because the serial communication with the Pi Co-op is not being shutdown properly when your script ends (again, another possible bug in PyMata).
Could you please try running your script again, and then after it's finished could you please run
- Code: Select all
lsof /dev/ttyS0
which should show you if any program is still using the GPIO serial port. You may need to run
- Code: Select all
sudo apt-get install lsof
to install lsof if it isn't already there.
Regards
Alan