Stop the robot after the third line
From wikiluntti
Introduction
How to stop the robot after passing the third (or nth) line? This problem is very often encountered in FIRST Lego League (FLL) or in Rescue competitions. The problem is that the sensor reads continous data, and simple solution wont work.

This page gives to different solutions: (i) using timer to pass the lines and (ii) using flip-flop algorithm to count the black lines.
Robot
Almost any robot will do. We use Asimov 2/ Verne robot.
Sensors
One color sensor is needed.
Example Videos
Theory
Readings of the color sensor

Using the timer
Using flip flop circuit
Example Code
Using the timer
Using flip flop circuit
Exercises
This course is supported by Meet and Code. The course is made in collaboration with Robotiikka- ja tiedekasvatus ry.
