[[SOLVED] Raspberry Pi zero w and Pivotpi

I tried to run the PivotPi with the Raspberry Pi zero w and python.
The error message> Could not determine default I2C bus for platform always comes up.
In the technical documentation and in the forum, I found no solution.
If the Raspberry pi zero is not supported, does anyone have the elemental i2c commands to run the Pivotpi board?

Hi @Study,

We’ve acknowledged your thread and we’ll get back to you as soon as we test the PivotPi.

Thank you!

Hi @Study,

I have done the following things:

  1. Burned an image of Raspbian For Robots on a micro SD Card.

  2. Ran an update on it: sudo curl -kL dexterindustries.com/update_pivotpi | bash

  3. Restarted the Pi.

  4. Ran the i2cdetect -y 1 command.

  5. Played with the PivotPi and the library that comes with it.

Here’s a screenshot of the output of the i2cdetect -y 1 command I got:


You can see those 2 addresses, 0x40 and 0x70 - these 2 belong to the PivotPi, so it means it’s reachable.

Could you show us/explain us in greater detail what you have tried to do?
Where did you get that error?
Were you trying to run a script?
And if so, which script was it?
Could you show us a screenshot?
What image did you use for your RaspberryPi? Etc.

Thank you!

Hi Robert,
Thank you for this informations.
First the short story:
I worked with the rasbian distrbution from raspberrypi.org
Then i installed the tools from github like found in the dexter forum (dexterind/pivotpi)
My next step was to create a small python script with python2, python3, Thonny
The result was allways the described error.
I could see the same screen with i2detect like you…
Now next weekend i take time to test rasbian for robots.
I hope, that it is working.
Then i make a description to clearify the situation.
Thank you and best Regards
Hubert Feierabend

Hi @Study,

I see, so you’ve tried it on a basic Raspbian and not on a Raspbian for Robots.
Tomorrow, I’ll try it on a Raspbian too and see if I encounter the same issue as you.

Thank you!

Hi @Study,

I came back with an answer for you.

I have tried the latest Raspbian version (the Stretch release) from the Raspberry Pi Foundation and it has worked for me.
Basically, I have followed the instructions described in my first reply to you and then I ran the example program which was found in ~/Desktop/PivotPi/Software/Python/example.py.
Could you also do the same and tell us if it had worked?

By the way, if there is a foam stacked on top of your PivotPi, please remove it as that may cause the I2C to stop working correctly.

Thank you!

Hi RobertLucian
with Raspbian for Robots all is working fine.
Then I was looking for the differences if i tried the standard raspbian with the package Dexterind\PivotPi.git from github
The answer of example.py is" PivotPi not found - quitting"
The difference was in the command platform_detect(). on Raspbian for Robots a 1 came back (means Raspberry) on the Raspbian a 0 came back, (means unknown)
That unknown platform stops the program.
By your test with Raspbian, whitch library have you loaded? Also the Dexterind\PivotPi.git from github? Or another library?
But I think platform is a basic Python library. Why the difference? I have to look.

Hi RobertLucian,
in the meantime I have find out that the command platform_detect() in the file Platform.py, specialy the command pi_version() gives back UNKNOWN instead RASPBERRY_PI.

Becaus i dont know where the command pi_version() is defined and what it is doing, I have made the following workaround.
In /home/pi/Dexter/PivotPi/Software/Python
In the file Platform.py I have added two lines in the Beaglebone section, before # Handle Minnowboard.

elif plat.lower().find('armv6l-with-debian') > -1:
    return RASPBERRY_PI

That is not a proper solution, but now i can work with the pivotpi board on the raspberry pi zero w.

later I have seen that in the \proc\cpuinfo two different Hardware dfinitions are decleared.

In Raspbian strech with the package Dexterind\PivotPi.git from github
Hardware: BCM2835

In Raspbian for Robots
Hardware: BCM2708

Maybee that this difference can result in wrong Answers (UNKNOWN) to the plattform_detect() command.
Please let me know if you have other news for me.

Hi @Study,

The issue

I think that’s the issue, yes. It seems like BCM2835 hasn’t been taken into consideration in pi_version() function.

The hotfix

I’m going to create a hotfix right now and maybe if you have the time, you can test it out:

Can you clone the hotfix/unidentifiable-rpi branch of the PivotPi and then manually install it by going in the Install folder and run the install.sh script? After you do this, your PivotPi should work on your Raspberry Pi Zero.

Alternative Script

By the way, if you use the getRPIHardwareRevCode() or getRPIGenerationCode() functions from the following module, do they return you the correct answer?

Thank you!


Instead of doing this:

Can you clone the hotfix/unidentifiable-rpi branch of the PivotPi and then manually install it by going in the Install folder and run the install.sh script? After you do this, your PivotPi should work on your Raspberry Pi Zero.

Can you just sudo curl -kL dexterindustries.com/update_pivotpi and then try running the example on your Raspberry Pi Zero?

Hi RobertLucian,

Test of getRPIHardwareRevCode() and getRPIGenerationCode():


please change Line
"0x9000C1" : [“Pi Zero W”, “RPI0”],
"9000c1" : [“Pi Zero W”, “RPI0”],
then it is working correct and gives the right answer.

Test with Python 3.5.3, Thonny, Python 2.7.13:
'Pi Zero W’


Hi RobertLucian,
Now the PivotPi on Raspberry pi zero w:
i have seen that the changes was made on github, so i have cloned the …/DexterInd/PivotPi.git from github and run the install.sh
The example.py was running well.
Thanks for the fast work

Hi @Study,

You’re welcome.
We also have fixed the issue you found by running these 2 methods:


Here’s a PR we’re for it:

By the way, I see you’ve updated the PivotPi the classic way: by cloning the repo and then installing it.
Just so you know, there’s also the other way of updating it, by typing the following command:

sudo curl -kL dexterindustries.com/update_pivotpi | bash

Thank you!

This topic was automatically closed after 42 hours. New replies are no longer allowed.