KS1 No ZeroBorg boards found, cannot set a new I?C address!

I am still trying to get the first one of my 15 KS1 working.

I am now getting this error after stepping through the initial setup:
>>> ZeroBorg.SetNewAddress(10)
Scanning I?C bus #1
No ZeroBorg boards found, is bus #1 correct (should be 0 for Rev 1, 1 for Rev 2)
No ZeroBorg boards found, cannot set a new I?C address!

I am powering the pi zero w with usb power and 9 volts power supply into the screw in bus...tested power and it is there. [ is that a correct way to supply power?

The 6 pin extender pins were tested and there is continuity from KS1 to the pi.

Any ideas?
I am hoping I can get through this stage so I can quickly get the other boards setup.

piborg's picture

There are two obvious possibilities in this case:

  1. The software is having trouble talking to the board
  2. There is a connection problem between the board and the Raspberry Pi

We did have some trouble with the software not being able to talk to ZeroBorgs with the latest versions of Raspbian recently. This could have the same symptom you are describing. The library was updated to fix the problem about two weeks ago, if you installed our software before that it may still have the problem.

I would start by re-installing our software to see if the latest version fixes your problem. See this post: ZeroBorg library fix.

After doing that I would try a simple check to see if the board is working with the standard address before trying to change the address. First load Python from the ZeroBorg directory:

cd ~/zeroborg
python

Next run these commands in Python to check if the ZeroBorg is talking correctly:

import ZeroBorg
ZB = ZeroBorg.ZeroBorg()
ZB.Init()
ZB.SetLed(True)

If everything worked the LED on the ZeroBorg should now be on. If not make a note of all the messages shown so we can try and figure out what the trouble is.

I am sure that the version of the software was your newest...but I reinstalled anyway.

Results of the test commands:
>>> import ZeroBorg
>>> ZB = ZeroBorg.ZeroBorg()
>>> ZB.Init()
Loading ZeroBorg on bus 1, address 40
Traceback (most recent call last):
File "", line 1, in
File "ZeroBorg.py", line 304, in Init
self.i2cRead = io.open("/dev/i2c-" + str(self.busNumber), "rb", buffering = 0)
IOError: [Errno 2] No such file or directory: '/dev/i2c-1'
>>> ZB.SetLed(True)
Failed sending LED state!
>>>

piborg's picture

The error you are seeing means that the code cannot find the I2C bus. This means it cannot talk to the ZeroBorg.

There are two likely candidates here:

  1. You have an older Raspberry Pi which uses i2c-0 instead of i2c-1
  2. The I2C drivers are not running

It is fairly quick to test which is the case. If you run these two commands:

sudo i2cdetect -y 0
sudo i2cdetect -y 1

either one of them will work or both will fail.

If one of them works it should show something like this:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: 40 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --

If sudo i2cdetect -y 0 worked then all you need to is open ZeroBorg.py in a text editor and look for this line:

    busNumber               = 1                 # Check here for Rev 1 vs Rev 2 and select the correct bus

and change it to

    busNumber               = 0                 # Check here for Rev 1 vs Rev 2 and select the correct bus

and check things all work correctly. If they do you will want to add the bus number when you call the SetNewAddress or ScanForZeroBorg commands as well, like this:

ZeroBorg.SetNewAddress(10, busNumber = 0)
ZeroBorg.ScanForZeroBorg(busNumber = 0)

If both commands failed with a message like this:

Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory

then the I2C driver is not correctly configured.

To fix that problem use sudo raspi-config and make sure the I2C driver is enabled (see ZeroBorg: Getting Started for instructions). After you have done that restart the Raspberry Pi get our setup to re-run like this:

cd ~/zeroborg
./install.sh

Restart the Raspberry Pi again and then check if either of the i2cdetect commands above work now. If one does retry the ZeroBorg check to see if it now works.

These were the steps that got it to work

Add the following line to /boot/config.txt

dtparam=i2c_arm=on

Add the following line to /etc/modules

i2c-dev

Reboot
piborg's picture

Glad to hear you got the I2C working :)

I will make a note of the fix in case anyone else has the same issue.

Just an FYI.

When I ran the sudo raspi-config, there was no 8 Advanced Option in order to enable the I2C.
Was there a particular release that has this option? I will look into this later.
Thank you. I will continue learning how to make this all work.

piborg's picture

Thanks for letting us know, I guess our instructions need updating again :)

They do seem to change the options in raspi-config every so often, the instructions on the website were definitely correct for the latest version around 6 months ago. They have probably added some new functionality and decided to re-arrange what sub menus are shown.

So the LED lights with a SetLed(true) and off when SetLed(false)

But when I attempt:
ZeroBorg.SetNewAddress(10)
The result is
Scanning I?C bus #1
Found ZeroBorg at 40
1 ZeroBorg found
Changing I?C address from 40 to 0A (bus #1)
Missing ZeroBorg at 40
Failed to set. Ew I?C address...

Any ideas?

These instructions worked:
import ZeroBorg
ZB = ZeroBorg.ZeroBorg()
ZB.i2cAddress = 0x40
ZB.Init()

But not the others that define setting an address in this fashion:
ZeroBorg.SetNewAddress(10)

Am I not understanding the difference?

piborg's picture

There is a mistake in the ZeroBorg.py script, causing the SetNewAddress function to fail regardless of if the board is attached or not.

I have fixed the error and re-uploaded the ZeroBorg code to our website. If you could re-installing our software and try the using SetNewAddress again. See this post for the re-install instructions: ZeroBorg library fix.

Sorry about all the trouble getting going :(

Hello
Have got an error => loading ZeroBorg on bus 1, address 40
Missing ZeroBorg at 40
ZeroBorg was not found

where I do sudo i2cdetect -y 1
I haven't got enything on the tab

I recieved my KS1 last day
please help me

piborg's picture

The most likely cause is a connection problem between the ZeroBorg and the Raspberry Pi.

Are you using wires to connect the ZeroBorg to the Raspberry Pi, or is it directly plugged in to the GPIO header?

Photos of the connections would be helpful :)

J'ai utilisé le la manière temporaire montré dans le "getting started" en tordent les broche, la LED ne s'arrête pas de clignoter dès le démarrage de la pi

Voici comment j'ai relié la zeroborg

Images: 
piborg's picture

Do you mean the LED on the ZeroBorg, or the LED on the Raspberry Pi?

The red LED of the zeroborg

piborg's picture

The LED should flash once at power-up so it is likely that the ZeroBorg is restarting itself. This usually indicates a power problem.

The most likely culprits are:

  1. The GPIO pins connecting power to the ZeroBorg (5V and 3V3) are not making a good connection
  2. The power supply providing the 5V power is not providing enough current to power everything

What is the Raspberry Pi getting its 5V power from?

La ZeroBorg tire sont alimentation d'un boîtier de 4 pils, j'ai testé les pils au tournevis testeur et il s'allume

piborg's picture

What are you using to power the Raspberry Pi itself?

J'utilise un adaptateur de téléphone, sur secteur

piborg's picture

In that case the most likely cause is that the GPIO connections are making poor contact.

A votre avis comment es que je peux faire pour résoudre le problème?

piborg's picture

The temporary connection method does not always work very well. If you have access to a soldering iron I would suggest soldering the connections on to the GPIO.

Très je revient vers vois des que j'ai du nouveau

It's work

Subscribe to Comments for "KS1 No ZeroBorg boards found, cannot set a new I?C address!"