Problems seeing Thunderborg

I’ve changed the bus number to 0 from 1 and I now get this

pi@DiddyPi:~/diddyborgv2 $ ./diddy2Sequence.py
Loading ThunderBorg on bus 0, address 2C
Traceback (most recent call last):
File "./diddy2Sequence.py", line 15, in
TB.Init()
File "/home/pi/diddyborgv2/ThunderBorg.py", line 301, in Init
self.i2cRead = io.open("/dev/i2c-" + str(self.busNumber), "rb", buffering = 0)
IOError: [Errno 2] No such file or directory: '/dev/i2c-0'
pi@DiddyPi:~/diddyborgv2 $

Any suggestions what I need to change?

piborg's picture

Only really early models of Raspberry Pis used bus 0, all others use bus 1.

The message here:

IOError: [Errno 2] No such file or directory: '/dev/i2c-0'

essentially confirms that there is no bus 0 to use.

If you get an error with bus 1 as well then run the following command and post the results:

sudo i2cdetect -y 1

This is the result of the command you suggested:

pi@DiddyPi:~/diddyborgv2 $ sudo i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- 2c -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
pi@DiddyPi:~/diddyborgv2 $
piborg's picture

It looks like your ThunderBorg has a non-standard address, it should be 0x15 but it is showing up as 0x2C instead.

You can reset the address fairly easily. First start Python from the DiddyBorg directory:

cd ~/diddyborgv2
python

Then run these Python lines to change the address:

import ThunderBorg
ThunderBorg.SetNewAddress(0x15)

Once changed the standard examples should start working :)

Still doesn’t see the Thunderborg. I’ve checked and double checked the connections.

pi@DiddyPi:~/diddyborgv2 $ python
Python 2.7.16 (default, Oct 10 2019, 22:02:15)
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ThunderBorg
>>> ThunderBorg.SetNewAddress(0x15)
Scanning I▒C bus #1
No ThunderBorg boards found, is bus #1 correct (should be 0 for Rev 1, 1 for Rev 2)
No ThunderBorg boards found, cannot set a new I▒C address!
>>> quit()

piborg's picture

Do you have any other devices attached to the GPIO?

My mistake - I have PicoBorg reverse, not a Thunderborg. Your commands were a great help getting it going - thanks!

Subscribe to Comments for "Problems seeing Thunderborg "