Setting up multiple UltraBorgs

Forums:

For those who would like some extra guidance here is a detailed explanation of setting up two UltraBorgs as a daisy-chain.
The procedure can be extended to as many boards as necessary.

1. Connect the first UltraBorg to the Raspberry Pi, make sure it is the only board connected.

2. Power up the Raspberry Pi.

3. Load a terminal.

4. Launch Python from the terminal in the UltraBorg folder using:
cd ~/ultraborg
python

5. Load the UltraBorg library using:
import UltraBorg

6. Configure your new address for the first board (in this example we will use 0x11):
UltraBorg.SetNewAddress(0x11)
you should see the following output:

Scanning I²C bus #1
Found UltraBorg at 36
1 UltraBorg board found
Changing I²C address from 36 to 11 (bus #1)
Found UltraBorg at 36
Address changed to 11, attempting to talk with the new address
Found UltraBorg at 11
New I²C address of 11 set successfully

7. Disconnect the first UltraBorg and connect the second UltraBorg to the Raspberry Pi, make sure it is the only board connected.
If you wish to be safe do this with the Raspberry Pi turned off, then repeat steps 2 to 5 afterwards.

8. Configure your new address for the second board (in this example we will use 0x12):
UltraBorg.SetNewAddress(0x12)
you should see the following output:

Scanning I²C bus #1
Found UltraBorg at 36
1 UltraBorg board found
Changing I²C address from 36 to 12 (bus #1)
Found UltraBorg at 36
Address changed to 12, attempting to talk with the new address
Found UltraBorg at 12
New I²C address of 12 set successfully

9. Now both boards are set you should connect them both to the Raspberry Pi using the daisy-chain connector.
If you wish to be safe do this with the Raspberry Pi turned off, then repeat steps 2 to 5 afterwards.

10. Scan the bus to make sure both boards can be seen correctly using:
UltraBorg.ScanForUltraBorg()
you should see the following output:

Scanning I²C bus #1
Found UltraBorg at 11
Found UltraBorg at 12
2 UltraBorg boards found
[17, 18]

If you are using a Rev 1 Raspberry Pi you will need to tell these commands to use the other I²C bus, when setting an address use:
UltraBorg.SetNewAddress(0x11, busNumber=0)
and when scanning the bus use:
UltraBorg.ScanForUltraBorg(busNumber=0)

If any of the boards cannot be found (either during setup or the final scan) check the wires are connected to the correct pins at both ends.

If you do connect the boards while the Raspberry Pi is powered do so very carefully, if you connect to the wrong pins you will probably cause the Raspberry Pi to reset.
We recommend to be safe that you power the Raspberry Pi off at steps 7 and 9, it only takes a short time longer and removes a chance of causing problems.

If anything is unclear ask below and we will be happy to help :)

Subscribe to Comments for "Setting up multiple UltraBorgs"