A python library with accompanying Arduino code to drive a vertical plotter from a Raspberry Pi. This project is targeted to drive the driver board created by makeBournemouth, but will work with any system capable of running Python and connecting to an Arduino/Genuino to drive the stepper motors
Running test1.py with:
or
This doesn't happen if just have setPlotting true.
The steppers are stop start and there is lots of output on the console.
I captured some (below) and in doing so caused a keyboard interrupt (ctrl-c) and the output stopped and the steppers started working normally.
Step handler thread exception : <type 'exceptions.OSError'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read buf = os.read(self.fd, size-len(read)) Step handler thread exception : <type 'exceptions.OSError'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read buf = os.read(self.fd, size-len(read)) Step handler thread exception : <type 'exceptions.OSError'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read buf = os.read(self.fd, size-len(read)) Step handler thread exception : <type 'exceptions.OSError'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read buf = os.read(self.fd, size-len(read)) Step handler thread exception : <type 'exceptions.OSError'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read buf = os.read(self.fd, size-len(read)) Step handler thread exception : <type 'exceptions.OSError'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 453, in read buf = os.read(self.fd, size-len(read)) Step handler thread exception : <class 'serial.serialutil.SerialException'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read() File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 460, in read raise SerialException('device reports readiness to read but returned no data (device disconnected?)') Step handler thread exception : <class 'serial.serialutil.SerialException'> File "/home/pi/pycupi/python/Pylargraph/serialHandler.py", line 106, in _stepHandlerThread dataRead = self.serialPort.read()
If setPlotting() should never be true when setShowDrawing() or setSaveDrawing() are True - can this not be done automatically?