Motor Bridge Cape/BBG with Debian 8 Jessie

I wanted to share my experience with making the Motor Bridge Cape work with Debian 8 Jessie on the BBG. I think it was only tested with Debian 7 Wheezy. I used this image debian.beagleboard.org/images/b … 4gb.img.xz, with the 4.1.23-bone-rt-r21 kernel.

The I2C bus mappings between the 2 OSes are different. What was I2C1 on Wheezy is now I2C2 on Jessie. I think this is actually an improvement, as the mapping did not match the AM335x I2C module numbers on Wheezy. An explanation can be found here: datko.net/2013/11/03/bbb_i2c/.

To make the Motor Bridge Cape work on Jessie with the Seeed python libraries, I needed to change line 37 of MotorBridgeCapeforBBG_BBB / BBG_MotorBridgeCape / MotorBridge.py to:

MotorBridge = Adafruit_I2C(0x4b,2)

I might suggest that the code detect the environment, or at least allow the user to set it. Jessie seems like a much superior OS in my limited testing.

-Chris

Hello Chris,

Seth here. I could not find out how you accomplished your goal. I followed the instructions and I came up with an issue. I get error codes.

If you need a specific type of screen capture, please let me know. I have been unable to get my MotorBridgeCape to work so far.

Seth

Okay and Hello,

I updated the firmware. I just needed to uncomment the enable BB-UART2 line we all added. I added the python-smbus because this is where I received the error.

Here is what printed out after I added the python-smbus.

Traceback (most recent call last):
File “DC.py”, line 1, in
import MotorBridge
File “/root/MotorBridgeCapeforBBG_BBB/BBG_MotorBridgeCape/MotorBridge.py”, line 37, in
MotorBridge = Adafruit_I2C(0x4b)
File “build/bdist.linux-armv7l/egg/Adafruit_I2C.py”, line 17, in init
IOError: [Errno 2] No such file or directory

I am going to add the 2, i.e. Adafruit_I2C(0x4b,2) on line 37.

Seth

P.S. I am still trying to run my motors. I have not been able to run the motors just yet.

Okay…

Hello again. I added the 2 in Adafruit_I2C(0x4b,2) on line 37. I get a readout of “hello” now.

This means nothing to me right now because the motor still did not turn clockwise or counterclockwise.

Seth

P.S. I am going to add the 12v battery and see what happens.

Hello,

I got the motor running. I had to plug in power via 12vDC battery, have an Internet connection, and have the BBG to USB plugged into the computer.

The example code for the DC Motor on seeedstudio.com/wiki/Motor_Bridge_Cape_v1.0 works. I just need to tweak it to suit my needs.

Thank you everyone. You have been very supportive through my confused state on this issue.

Seth

P.S. If anyone needs to know what to do, please just ask me. I have only run one motor thus far. I will check more motors in the future.