it looks like that p, i, d and qpps must be an integer otherwise there is the following error:
Code: Select all
pi@raspberrypi:~/Documents/MCP236_py3/TestPrograms $ python3 roboclawPIDspeedpy.py
'MCP236 2x30A v1.1.8\n'
Traceback (most recent call last):
File "roboclawPIDspeedpy.py", line 25, in <module>
rc.SetM1VelocityPID(address,p,i,d,qpps)
File "/home/pi/Documents/MCP236_py3/TestPrograms/roboclaw_3.py", line 765, in SetM1VelocityPID
return self._write4444(address,self.Cmd.SETM1PID,d*65536,p*65536,i*65536,qpps)
File "/home/pi/Documents/MCP236_py3/TestPrograms/roboclaw_3.py", line 534, in _write4444
self._writelong(val1)
File "/home/pi/Documents/MCP236_py3/TestPrograms/roboclaw_3.py", line 199, in _writelong
self._writebyte((val>>24)&0xFF)
TypeError: unsupported operand type(s) for >>: 'float' and 'int'
In BasicMicroStudio is possible to set a pid with a floating point
how can I do by serrial command?
Thanks in advance