Tuesday, February 23, 2010

How to keep count as the light sensor passes 3 black lines

Click here for the video

One of my team member has decided that he needs 2 light sensors, and one of the light sensor will follow the black line,and the 2nd sensor, will count the intersecting black lines, and at the 3rd black line he will stop the robot and do something else.
So the question is how do you program the robot to keep count on the sensor information.
Well, here is a very good video tutorial that explains exactly this condition.
simply substitute touch sensor for light sensor, and change the control value from 10 to 3.