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
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.
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
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.