[BrickPi+] Motors Response

I too just received a brickpi and am finding I’m having a similar as others. I grabbed the latest raspian OS on a fresh sim card. I don’t yet have an EV3 motor, but I do have an RCX era motor and an adapter cable for EV3 cabling. I followed a forum post advising giving pi access to tty group on /dev/ttyAMA0, but no luck.

I am running the following but not seeing any motor movement on output ‘MA’:


pi@dex:~/Desktop/BrickPi_Python/Sensor_Examples $ sudo python LEGO-Motor_Test.py
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Traceback (most recent call last):
  File "LEGO-Motor_Test.py", line 35, in <module>
    BrickPiUpdateValues()       # Ask BrickPi to update values for sensors/motors
  File "build/bdist.linux-armv7l/egg/BrickPi.py", line 551, in BrickPiUpdateValues
  File "build/bdist.linux-armv7l/egg/BrickPi.py", line 680, in BrickPiTx
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 489, in write
    raise SerialException('write failed: %s' % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

Hi Tomek, are you using Raspbian for Robots? What’s the date on it? How did you get it and install it?

Hey John,

I am using the Rapbian for Robots using the image available yesterday (2016.04.25_Dexter_Industries_jessie.img) from http://www.dexterindustries.com/howto/install-raspbian-for-robots-image-on-an-sd-card/.

Today I ran the update on the desktop for the dexter software, re-ran the python script and now get the motor the spin forward and backwards just a few times before it fails, the message is copied below. Within scratch, I am able to get the motor to spin a few seconds before it also stops.


pi@dex:~ $ sudo python Desktop/BrickPi_Python/Sensor_Examples/LEGO-Motor_Test.py 
Running Forward
Running Backward
Running Forward
Running Backward
Running Forward
Traceback (most recent call last):
  File "Desktop/BrickPi_Python/Sensor_Examples/LEGO-Motor_Test.py", line 35, in <module>
    BrickPiUpdateValues()       # Ask BrickPi to update values for sensors/motors
  File "build/bdist.linux-armv7l/egg/BrickPi.py", line 551, in BrickPiUpdateValues
  File "build/bdist.linux-armv7l/egg/BrickPi.py", line 680, in BrickPiTx
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 489, in write
    raise SerialException('write failed: %s' % (v,))
serial.serialutil.SerialException: write failed: [Errno 5] Input/output error

I spent the day working on this. There is a major issue with Jessie and serial communications (we documented this and thought we had solved the issue a while back but apparently not fully). I still don’t have a full solution yet.

We’ll keep you updated on this issue and the progress in solving it. In the meantime, if you’re using Jessie, you’ll need to revert to using Wheezy. I’ll have an image up on Sourceforge shortly here: https://sourceforge.net/projects/dexterindustriesraspbianflavor/files/

Pulling the Wheezy image resolved the issue, thanks!

Team just got a solution for Jessie. If you want to use Jessie and the BrickPi, you need to disable the serial console. Basically, you’ll need to edit /boot/cmdline.txt and remove any references to ttyma0

This is what /boot/cmdline.txt should look for the BrickPi to work on Jessie: dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

Team just got a solution for Jessie. If you want to use Jessie and the BrickPi, you need to disable the serial console. Basically, you’ll need to edit /boot/cmdline.txt and remove any references to ttyma0

This is what /boot/cmdline.txt should look for the BrickPi to work on Jessie: dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait

1 Like

I had the same issue, and this solution resolved it. I struggled with it for almost two days, before finding this post. Perhaps the change to /boot/cmdline.txt should be rolled into the ./install.sh script that allows to modify your own image. I am running Raspbian Jessie with PIXEL.

Hi @Francesco_F,

Thanks for your suggestion and we will try to get it into our install script soon.

-Shoban