Hi, I am currently doing a school project for a VEX 2.0 3 Line Follower Robot. The integrity of the parts, sensors, cortex, and controller is perfecrly fine. The problem is that the robot will not follow the dark line on the light surface, and I believe is in the code. The current state of my code is:
I have put a light source underneith the robot to see if it would respond to the light. I’ve also put my hand over the sensors to see if the line followers would detect the dark and then move, but it did not work. I checked the debugger many times to see if the values through the sensors are within optimal range, and they are, but they are still unresponsive.
Unlike Light sensor, Line Tracker has its own built-in infrared light source and doesn’t need any additional lighting.
Here is a great resource on how to use Line Trackers:
The main problem that I see with your code is that motor values for turnleft() and straight() are incorrect. Also you don’t have to start new task every time you need to adjust your heading.
And this is the sample code for the Line Follower robot with Triple Line Tracker:
@MattyIce, next time when you get a chance, could you start your program under RobotC debugger, open sensors tab and see what values do you get when you move your robot over the line?