I’m trying to calibrate the line follower over white space, but I’m not able to get the all values within a 100 of each other. I’m getting readings like:
560 50 45 48 55
All my readings have been like that, the last 4 being close together and the first one being off by a few hundred. How do I fix this?
Not that it helps in any way, but I was playing with the line follower today, and got into the same situation. I’m still investigating.
you’re not alone!
Sorry to hear about this speedbump. I have a few thoughts and questions:
The readings you’re posting, is that a calibrated reading or is that uncalibrated?
If you pull the line sensor off the GoPiGo and you lay it with the shielding acrylic against the ground, do you get a level reading?
If you cover up all of the sensors with your fingers, do you get an even reading?
If you rotate the line sensor around, do you get a different response (is light from one section of the room distorting the reading?)
The line sensor has to be level with the ground, so that’d be the first thing to check!
Also you might want to check this video series out about setting up the Line Follower:
@kavsub: the line follower has to be kept only a few millimeters above the surface. Can you post a few pictures of of your setup and how you are trying to calibrate with the white surface.
@JohnC, tried the things you suggested. These are the readings I’m receiving while calibrating:
Line sensor off GoPiGo, level to ground:
(179, 41, 40, 41, 41), (148, 41, 39, 40, 41), (44, 35, 33, 35, 35)
Readings with fingers covering sensors:
(410, 758, 750, 273, 49)
I didn’t get any significant difference rotating the sensor around.
Based on your first suggestion it does seem as though the issue is the line sensor isn’t level. Check out the pictures attached.
@karan, picture of my setup:
@kavsub: can you post what the readings on the white and the black line look like.
(695, 285, 96, 172, 187)
(1004, 981, 973, 977, 979)
@kavsub: Not really sure why the sensor value on one sensor is so far apart, but the range still looks pretty good enough for the software to differentiate between the white and the black line.
Can you try out the rest of the tutorial and see whether the line following examples work for you.
@karan: Just tried it out. Unfortunately, still is not working that well after trying out the example scripts.
@kavsub: Are you using the line follower in Scratch or Python. Did you follow the instructions here mainly the calibration part. Also, what do you see in the GUI when you run step 4 :Test run on that page . Can you also post some screenshots of what you see in each menu option.
Can you describe a bit more about what all have you tried and what failed for you.