BrickPi on RPi3 newbie - communication only works for a few seconds


Hi forum!
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 *
BrickPi.MotorEnable[PORT_A] = 1
def run_motors():
 while True:
  BrickPi.MotorSpeed[PORT_A] = 200
  BrickPi.MotorSpeed[PORT_A] = -150

this program only works for a few seconds, after that it crashes with this message

pi@dex:~ $ sudo python 
Traceback (most recent call last):
  File "", line 13, in <module>
  File "", line 8, in run_motors
  File "build/bdist.linux-armv7l/egg/", line 582, in BrickPiUpdateValues
  File "build/bdist.linux-armv7l/egg/", line 698, in BrickPiFlush
  File "/usr/lib/python2.7/dist-packages/serial/", line 572, in inWaiting
    return self.in_waiting
  File "/usr/lib/python2.7/dist-packages/serial/", 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?



I found a Raspberry 2 :slight_smile:

But…same error. After a few seconds I got the same error as described above.

Can someone put me into the right direction? BrickPi firmware update procedure?



The original BrickPi and the BrickPi+ are not supported on Raspbian Stretch. You will need to use an older version of Raspbian, such as Jessie or Wheezy.

From your description and output message, it seems like an issue with the RPi software, not the BrickPi firmware.