[SOLVED] GoPiGo2 line follower not working (returns -1,-1,-1,-1,-1)

I found this posting [Solved] Line follower Calibration Returns (-1, -1, -1, -1, -1)

that says updating the go pi go should fix the problem, but it hasn’t for us.

We’re using GoPiGo2 with Raspian for Robots trying to do Mission 11 of our GoBox.
Version is V 7.2

Any other ideas?

Hello? Hello? Is this thing on?

:wink:

Hello @rexmagoo
My apologies, I was out for a few days with a health issue.

I have to investigate this but I do have an inkling as to what the problem could be.
Btw, I seem to remember you asked if GoBox could be done with Bloxter. As of DexterOS 1.1, yes, they can.

Quick question for you @rexmagoo

In a terminal window, if you enter
i2cdetect -y 1
do you see the 06 and 08 on the first line as in the following?
i2cdetect

Thank you for the extra information

Rex and I will check this out tonight when I’m home from work and report back.

Thank you! And, also good to know the GoBox missions can be done with Bloxter!

John

1 Like

OK - just checked and we’re good. 06 and 08 on the first line as shown. (screenshot attached)

59 PM

What do you get when you do the following?

cd ~/Dexter/GoPiGo/Software/Python/line_follower
python check_line_sensor.py

I’m getting:

--> Line sensor found

Time:	0.0094 s
IR1:	42 /1023 
IR2:	418 /1023 
IR3:	449 /1023 
IR4:	402 /1023 
IR5:	494 /1023

I’m also assuming you’ve calibrated the line sensor. How did that go?

OK - I’ll run that when I get home tonight.

And, yes, we did run the line calibration which is how we discovered the problem. Because sensor over black tape = -1,-1,-1,-1,-1 and sensor over white background = -1,-1,-1,-1,-1. We ran it many, many times hoping for something to click, but no matter what we did we got the same result. Which, I understand might be the definition of insanity :wink:

Here’s what we get (see attached). I waited for about 5 minutes for the “Time:” information to appear but nothing else happens. Hopefully, this will help you pinpoint where it’s all going wrong for us.

19 PM

Any more thoughts on this? Why is it getting stuck after “Line sensor found”?

Thank you.

Hello @rexmagoo,
apologies again. I’ve tried duplicating your issue and to no avail. But there’s at least another customer with a similar issue so there’s definitely something wrong somewhere.
Currently, we think it may be a kernel issue.
Could you run this command in a terminal window, and let me know the result?
uname -a
You can follow @RobertLucian’s instructions in this post

Cleo

07 PM

Sorry it took me so long to respond, it was my turn for a busy week. So, I’ll follow the instructions in the @RobtertLucian post to downgrade and let you know if that work for us.

So, I ran this:

sudo rpi-update 52241088c1da59a359110d39c1875cda56496764

and it very quickly told me that our firmware was already up to date.

35 PM

Tried to calibrate and still getting -1, -1. -1, -1, -1 on both the black line values and the white line values.

Hey @rexmagoo
What does uname -a say after you ran the sudo rpi-update command?

02 PM

Same as before.

Hi @rexmagoo,

We know for sure that the Line Follower Sensor doesn’t work on 4.9.35-v7+ as the Foundation has changed how the protocol works, but I’m surprised the rpi-update command isn’t doing its job - we even had checked the hash value we’ve given you in the rpi-update command and still points to version 4.4.50-v7+, so we can rule out the human error.

I’m going to test this on my Raspberry Pi and see if rpi-update downgrades the kernel or not.

As a side note, we have a fix on our sleeve and we’re about to roll it out very soon - this will make the Line Follower Sensor work on any version of the kernel.

Thank you!

Hi @rexmagoo,

Just letting you know we’ve got the fix in place for a while already in case you didn’t know.
sudo sh -c "curl -kL dexterindustries.com/update_gopigo | bash" will update you to the latest.

Thank you!

1 Like