I’m trying a follow the line untill all is black with a basic black line and a “T” to be able to reach a point.
Calibration are done successfully, the line follower seems to work correctly (value are consistent).
But the GOPIGO doesn’t follow the line and spin randomly.
What is wrong in this case. Is there any troubleshooting guideline i can use ?
Sure, please find the video. And i’m using a bloxter function, but please find the python code associated. I changed nothing, just calibrate white and black and then run a follow the line until all is black.
gpg.forward()
while not my_linefollower.read_position() == “black”:
if my_linefollower.read_position() == ‘center’:
gpg.forward()
if my_linefollower.read_position() == ‘left’:
gpg.left()
if my_linefollower.read_position() == ‘right’:
gpg.right()
gpg.stop()
Sorry for the copy paste that didn’t respect the indentation python requirement.
Thanks to the fix 2.2.3 ( thanks again cleoqc ). I was able to run step by step the python code generated. And i have some weird output. Please find some example :
import easygopigo3 as easy
import time
sensor_readings = None
gpg = easy.EasyGoPiGo3()
my_linefollower = gpg.init_line_follower()
my_linefollower.read_position()
‘center’ # this one is correct, i was on the black line
my_linefollower.read_position()
‘center’ # this one is uncorrect i think, i spined a bit the gopigo to the left ( all the right captor was on black , left captor on white
my_linefollower.read_position()
‘left’ # this one is uncorrect i was totally on the white
my_linefollower.read_position()
‘white’ # incorrect, totally on the black
Update : I found the issue, the output of read_position is not aligned with the python code ( extract from the bloxter )
When position is ‘left’ it should go to right and vice versa. I swapped it on the code and it works well.