[SOLVED] Hanging I2C sensors on Gopigo3

Good evening,

I just assembled and follow the installation instruction for the Gopigo3 (following this :https://github.com/DexterInd/GoPiGo3) . my problem is i cannot use the i2c sensors. everythings working : motors, servo motors, leds, eyes… but when i connect a i2c sensor (line follower, distance sensor and Imu sensor) nothing happen : i do i2cdetect -y 1 : i only have dashes.
i did Troubleshooting Script :slight_smile:
GoPiGo3 Troubleshooting Script log

Checking for hardware, and checking hardware and firmware version.
==================================================================
Manufacturer    :  Dexter Industries
Board           :  GoPiGo3
Serial Number   :  3D25ADD2514E4C47324B2020FF04211B
Hardware version:  3.1.3
Firmware version:  0.3.2
Battery voltage :  8.026
5v voltage      :  5.073

I updated following this : https://www.dexterindustries.com/GoPiGo/get-started-with-the-gopigo3-raspberry-pi-robot/3-program-your-raspberry-pi-robot/python-programming-language/

then i tried to update the firmware but the version didn’t change.
(following this : https://www.dexterindustries.com/GoPiGo/get-started-with-the-gopigo3-raspberry-pi-robot/test-and-troubleshoot-the-gopigo3-raspberry-pi-robot/ )

i don’t know what to do more.
I’m on a Raspberry pi 3 model B, under raspbian jessie (version 8),

Thanks,
and have a good week end,

Clémence

Hi @cvanhav,

There are a couple of things we can check:

  1. Can you tell us to which port are you trying to connect the I2C devices? If you’re connecting them to the AD1 or AD2 ports they won’t show up, but they will if they’re connected to an I2C port. You can see the hardware references here.

  2. Do you have any foam attached to your GoPiGo3 on the header pins? It should be black and if it’s there, please remove it as it makes the I2C non-functional.

  3. Can you check with sudo raspi-config that you have the I2C interface enabled? If I2C is disabled you shouldn’t be able to run i2cdetect -y 1, but nonetheless, we should check just because.

Thank you!

Good evening,

  • Yes the ports used are I2C ports, not serial and not AD1 or AD2.
  • the foam you mean is the one put on the males pins for protect it when I received the GoPiGo? or the one in plastic receiving the raspberry pi males pins?
  • I did sudo raspi-config, enabled (ARM) i2c interface and then reboot.

One thing maybe not linked but when I start the line follower “basic_example.py” program, it told me “importerror no module named smbus” (using python 3.6.3) but when i want to install it, it says its already installed.

Thank you! :slight_smile:

Hi @cvanhav,

the foam you mean is the one put on the males pins for protect it when I received the GoPiGo? or the one in plastic receiving the raspberry pi males pins?

Yes, the first option is correct. It’s the foam that’s put on the male pins (aka header pins) of the GoPiGo. If it’s there, remove it otherwise, you’ll have trouble.

Second of all, the import error no module named smbus is quite important - without it, you can’t interface with your GoPiGo, but still, this has nothing to do with what you get on i2cdetect -y 1.

Therefore, I would recommend you use Python2 instead of Python3 until we get it to work. After that, if you request it, I can write a fix for the library so it can also support Python3.

I’m waiting to see what you got there.

Thank you!

1 Like

Hello @RobertLucian,

I finally suceed to have my i2c ports working by move to another raspberry pi (I don’t know if its a true victory or just a give up :smile: ). I use python3.4 and it okay. (some programs use python3 i was not able to not use it).
So my distance sensor and mi IMU sensor work fine! That’s great and I thank you.

But one last thing. I’m not able to use the line follower. when I try basic_example.py nothing append (same for line_follower_basic_example) and I add this line

print(“line follower dependency installed: {}”.format(easy.is_line_follower_accessible))

its say false. and some other tell me

Line Follower library not found

what I should do?

Thank again

Clémence

Hi @cvanhav

That’s because the line follower sensor is installed along with the GoPiGo2 library. In order to have the line follower installed you have to run the following command in a terminal:

sudo curl -kL dexterindustries.com/update_gopigo | bash

The line follower sensor is a part of the GoPiGo2 library because it was originally developed for it and since we’re going to have a better line follower sensor in the future, we decided to keep it in there.

We are waiting to see if that worked for you.

Thank you!

hi @RobertLucian,

Okay, I did it, and when I do python check_line_sensor.py
It says “Line Sensor Found” this is okay, but nothing else ; and each time it try a program ( line_threshold_set.py, basic_example.py …) nothing appears or append.
When I Ctrl+C the code stoped each time at l0,l1,l2,l3,l4=get_sensorval().
Look like its waiting to have values thats never come…
Here a screenshot :
IRsensorproblem

When I do i2cget -y 1 0x06 : I have 0x01 as answer (on white or black surface).

P.S: Are you going to make a library for GoPiGo3 in the future? I would like to use the line sensor, the distance sensor and the IMU sensor all together in the same code.

Thank you,
Clémence

Hi @cvanhav,

So you did the update, you did detect it with i2cdetect -y 1, but when you try reading from the sensor, you get nothing. Judging the screenshot you’ve posted, it looks like the script has an error at writing a block of I2C data.

That only thing I can think of is a kernel issue that prevents the script from communicating with the sensor. Fortunately, we’ve already encountered such an issue, though it would only happen when we would want to issue a read command on the I2C and not a write command. Bottom line is that with newer versions of the kernel, the line follower no longer works and that’s because the implementation of the I2C protocol has changed.

In order to determine whether you have a newer version, please enter the following command in a terminal:

uname -a

If you see anything above 4.4.50-v7+, then your line follower won’t work with what you have.
If you have a newer one (that’s more recent than the 4.4.50-v7+), please run the following command in order to downgrade it:

 sudo rpi-update 52241088c1da59a359110d39c1875cda56496764

This is going to take a couple of minutes to finish, but after you do it, you’re going to have a working line follower.

We already have a hotfix for making the line follower work on the latest kernel versions (you can read it for a better understanding):

It’s not accepted yet because we need to alter a couple of other things before we get a green go for it.

Waiting to see if that was the issue with your line follower.

Thank you!

hello @RobertLucian,
Thanks a lot for you help, now everything is working good.
Have a good day :smiley:

Clémence

Hi @cvanhav,

That’s good to hear.
I’m now going to set a timer on auto-closing this thread.

Thank you!

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