Gui not working

Forums:

Have run through this set up - https://www.piborg.org/ultraborg/install
Have both icons on my desktop but if i click them nothing happens... have i missed something?

piborg's picture

Usually this points to an error preventing the script from starting correctly.

Try opening a terminal and running the GUI script:
/home/pi/ultraborg/ubGui.py

If the script now loads the GUI there is a problem with the shortcut itself.
If the script fails to load post all of the messages shown and we will try and figure out why it cannot run for you.

Hi, this is the error im getting..

pi@Pi42:~/ultraborg $ python ubGui.py
Loading UltraBorg on bus 1, address 36
Missing UltraBorg at 36
UltraBorg was not found
Trying bus 0 instead
Loading UltraBorg on bus 0, address 36
Traceback (most recent call last):
File "ubGui.py", line 11, in
UB.Init() # Set the board up (checks the board is conn ected)
File "/home/pi/ultraborg/UltraBorg.py", line 294, in Init
self.Init(False)
File "/home/pi/ultraborg/UltraBorg.py", line 264, in Init
self.bus = smbus.SMBus(self.busNumber)
IOError: [Errno 2] No such file or directory

I think its an address issue but where in the code do i change the address which i think is (10) from the getting started tutorial.

piborg's picture

You can check what the current address is by loading Python:
cd ~/ultraborg
python
then run these lines to print the address of the board:

import UltraBorg
print UltraBorg.ScanForUltraBorg()

You can correct the problem in three different ways:

  1. Change the address back to the default
  2. Set the correct address in each script
  3. Set the correct address in UltraBorg.py

You should only make ONE of these changes, not all three!

1. Setting the address back to the default

load Python:
cd ~/ultraborg
python
then run these lines to set the original address for the board:

import UltraBorg
UltraBorg.SetNewAddress(0x36)

2. Set the correct address in each script

In each script look for the line:

UB = UltraBorg.UltraBorg()

Set the correct address on the very next line like this:

UB.i2cAddress = 10

3. Set the correct address in UltraBorg.py

In UltraBorg.py look for the line:

i2cAddress              = I2C_ID_SERVO_USM

Replace the value after = with the correct address like this:

i2cAddress              = 10

Thank you, will try this and see what happens.

Subscribe to Comments for "Gui not working"