BrickPi Simple Bot Motor Problem

I have no programming experience but am trying to learn with my Raspberry Pi and BrickPi. I have started the Simplebot project and am running into difficulty:

What I have done thus far:
Set up the Raspbian OS
Downloaded the BrickPi repository thru github
Run install set up based on instructions from the website
Using the microUSB on the RasPi
I ordered the BrickPi SD card via Amazon to try that as well, however it didn’t work.

I am getting the below error but do not know where to research in order to correct:
pi@raspberrypi ~/BrickPi_Python $ python
Traceback (most recent call last):
File “”, line 47, in <module>
BrickPiSetup() # setup the serial port for communication
File “/home/pi/BrickPi_Python/”, line 539, in BrickPiSetup
File “/usr/local/lib/python2.7/dist-packages/pyserial-2.7-py2.7.egg/serial/”, line 289, in open
self.fd =, os.O_RDWR|os.O_NOCTTY|os.O_NONBLOCK)
OSError: [Errno 13] Permission denied: ‘/dev/ttyAMA0’

Any guidance is greatly appreciated.

Hey Kelly, two questions:

  • Can you try running the same command, but putting “sudo” in front of it? So running sudo python That usually solves permission issues. **
  • Can you explain what you mean by “I ordered the BrickPi SD card via Amazon to try that as well, however it didn’t work.”

(an explanation of the use of sudo is here: )

Thank you for such a fast reply.

I used the sudo python script. While I did not receive any error, it simply took me to the next line in my terminal window but nothing happens. Is there something else I need to do other than type the “w” to move forward etc.

To answer your question on the SD Card:
I originally order the Raspberry Pi and the BrickPi separately. I have been using the SD card that I received with the Raspberry Pi. While I was reading the instructions on the Dexter Industries website about downloading the BrickPi Setups and reconfiguring my image. I was nervous about doing that since I am not very technical. I decided to order the Dexter Industries SD Card with the files already loaded. Unfortunately, when I plug it into the Raspberry Pi I can see it running thru the set up but it eventually gets to a black screen. My mouse works at that point, but everything else is black. At that point I decided to go back to my original SD Card. If you have any suggestions on how to correct this I am happy to take those as well.


After reading a few other posts I saw a string about using my battery pack and microUSB together for the motors to work. I plugged in my 8AA battery pack and tried running the “” file.


  1. Running in Python Shell: same permission error as my original post.
  2. Running in Terminal: program prints “Running Forward” and “Running Reverse” but the motors do not move.

I tried plugging one motor in at a time in each port but nothing has happened.

Any suggestions on what I might be doing wrong?

Also, is there a way to fix the permission error in the Python Shell so I can run from there as well?


Hey Kelley, Sorry for the slow reply this time.

No, we haven’t tried running this in python shell. The way the example programs are written, they’re meant to be run from the command line. We did a quick tutorial on how to run python on BrickPi from IDLE here:

When you ran the example program, did you see any permission errors? Using the “sudo” prefix, correct?

And when you plugged in the motors, did you plug them in according to this diagram, in the MA and MB positions:

No worries on the delayed response. I appreciate you making it back to me.

I was able to figure out my problem and my “She-bot” is working perfectly.

I am working on a project to program the simple bot to run thru a Lego town obstacle course. I would love to share the video footage with you once it is complete.

Thanks again.

Hey Kelly! Glad to hear it’s working, that’s fantastic! It sounds like a really cool project with your She-bot, can you send us some pictures when you get it going?