I saw a problem statement of some robotics event, in which we have to follow a line on a white surface. The color of the line changes from black to red in between.
Also the lines run over each other, picture attached.
I cant figure out, how to get it to follow the line...can you suggest something.
Also will normal IR sensors be able to distinguish both black and red from white?
An IR sensor detects how much light it receives. More light is reflected by the white surface than is reflected by the black line. The red line should reflect an amount somewhere in between. The black changing to red which then crosses the black is an opportunity for your robot to demonstrate that is knows better than to always try to keep the darkest portion centered.
The only difference between following a single color line and following multiple color lines will be in the values returned by the IR sensors. You will need to experiment with your robot to see what values you get.
The challenge with the multi-color course is that typically, the robot wants to keep the highest (or lowest) values centered. In the multi-color situation, you need to change your thinking when the color you are following changes from black to red.
If I wrote the code for you, what would you have learned? Would you be competing fairly?