Example python script crashes pi


#1

Hi Dexterians,

I’ve finally had a chance to try to sink my teeth into a BrickPi project but I’m running into some major issues.
I’m using the latest Dexter Industries raspbian image (2014.01.20_Dexter_Industries_wheezy.rar) and updated it with the latest raspbian packages.
I’ve installed all the software following the instructions at http://www.dexterindustries.com/BrickPi/program-it/python/ (specifically the

sudo apt-get install python-setuptools
sudo python setup.py install

bit)
and I’ve pulled the very latest code from Github…
but when I try to run https://github.com/DexterInd/BrickPi_Python/blob/master/Sensor_Examples/LEGO-Motor_Test.py I have two motors going forward successfully, but as soon as they are supposed to reverse direction, my Pi reboots…
What can I do to get this working ? What are the standard debugging steps in this kind of situation ?


#2

Hey Ivar,

It might be that a strong power draw is dropping the voltage supply down below an operating level for the Raspberry Pi.

So, questions:
What BrickPi are you using? Basic or Advanced?
How are you powering the Pi and BrickPi?

Possible Solutions to Try:

  • Reduce the speed at which the power is shifting back and forth. Go to 0 and pause, and then go into reverse for example.
  • Put the RPi on USB power. Just to see if it makes a difference.

** BTW: you don’t need to run the python setup with the new image. That shouldn’t be affecting the situation, but for anyone else watching: python and everything else comes fully installed on the latest image.