Two UltraBorgs


Simple question (I hope). If I mount two UltraBorgs on a single Pi (I understand about changing addresses), can I run one of them powered by the Pi (jumper fitted) and the other from a separate battery (actually from a BatBorg), jumper not fitted?

piborg's picture

Yes, it is absolutely fine to use the 5V link jumper with one UltraBorg and the external 5V connection with a second one at the same time :)

I would recommend having the UltraBorg using the 5V link connected directly to the Pi if you are daisy-chaining the two boards.


I now have 2 UltraBorgs fitted to Diddy, one driving the ultrasonic sensors and the other driving 2 servos. The Ic2 address of the first one is Hex 36 Dec 54 (left as set by you originally).
I have altered the address of the second board to Hex 37 Dec 55 as per your instructions and both boards are now working together correctly.
However, I need to adjust the tuning of the servos on the second board but find that the ubTuningGui program can't find the second board. I have amended the script to read...

UB = UltraBorg.UltraBorg()
UB.i2cAddress = 55

Running it from a terminal window it reports:

Loading UltraBorg on bus 1, address 36
Missing UltraBorg at 36
UltraBorg was not found

Obviously I have disconnected the first UltraBorg when I try this to avoid it using the board it finds at 36.

Is there something else I need to alter to get ubTuningGui to find the second board?


piborg's picture

That should be the only thing you need to change.

The first printed line (Loading UltraBorg on bus 1, address 36) is showing what the i2cAddress value is set to when Init was called, so this should not be possible.

Is there any chance of a typo on the line setting the address?

Strange. No typo as far as I can tell.
I am wondering if there is a "compiled" ubTuningGui.pyc that is being used rather than the .py standard version, I have had a similar problem before. Next time I fire up Diddy I'll have a root around.

I've booked with Specsavers!
Now working.

Subscribe to Comments for "Two UltraBorgs"