Hi Max,
If you could post the code so that I could have a look, then that would be very helpful.
I have occasionally seen connection problems with the Pi Co-op which I believe may be due to timing issues when the Pi resets the Pi Co-op or perhaps it's due to problems with the serial communication. The problem is that I've only seen the problem very infrequently, it's tough to get a repeatable test case and rebooting does seem to solve the problem. If you've got a program which encounters the problem repeatedly then it could be very useful for resolving it.
Alternatively, the other thing that could be going wrong is that your program may not have exited cleanly one of the previous previous times it ran. This would mean that it might still be sitting there, interfering with any serial communication you later try to do with the Pi Co-op.
You can check for this by running
- Code: Select all
ps aux | grep python
which should show you all of the Python scripts running on your computer. You can kill them to shut them down completely by running
- Code: Select all
sudo kill -9 PID
where PID is the ID of programs process (number displayed in the 2nd column when you run the ps command).
Hope that helps.
Regards
Alan