i am testing the (old) BrickPi of my school. i downloaded the latest raspbian for robots and did the apt-get update and upgrade and rpi-upgrade.
I still have problems with the BrickPi-Communication.
from BrickPi import * BrickPiSetup() BrickPi.MotorEnable[PORT_A] = 1 BrickPiSetupSensors() def run_motors(): while True: BrickPi.MotorSpeed[PORT_A] = 200 BrickPiUpdateValues() time.sleep(1) BrickPi.MotorSpeed[PORT_A] = -150 BrickPiUpdateValues() time.sleep(1) run_motors()
this program only works for a few seconds, after that it crashes with this message
pi@dex:~ $ sudo python bp1sensor.py Traceback (most recent call last): File "bp1sensor.py", line 13, in <module> run_motors() File "bp1sensor.py", line 8, in run_motors BrickPiUpdateValues() File "build/bdist.linux-armv7l/egg/BrickPi.py", line 582, in BrickPiUpdateValues File "build/bdist.linux-armv7l/egg/BrickPi.py", line 698, in BrickPiFlush File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 572, in inWaiting return self.in_waiting File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 456, in in_waiting s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str) IOError: [Errno 5] Input/output error
i am running python 2.7.13
I read something about another update procedure on my raspbian - but this is the latest image. Another strange thing: the BrickPi Python Module was not installed. I got this from GitHub. Bluetooth is not activated on my Pi3 Model.
And I read something about a brickpi firmware update via an arduino. This would not be a big problem, but i guess this is time consuming to set up.
Am i missing something? I wasn’t able to find this behaviour in the internet or this forum…
Can someone help me?