Stop at Line
Use the Colour Sensor to stop the Driving Base when a line is detected.
Build the Driving Base model.
Recreate the program shown below, then download and run to test. Set the sensor threshold for best results.
For best results, ensure the dark line is at least 20% darker than the surrounding surface. The line may not be detected if the Driving Base turns too quickly.
Large Motor - On
Wait - Colour Sensor – Compare Reflected Light Intensity[Less Than, 50]
Large Motor - Off
Now it’s your turn! See if you can make the Colour Sensor detect a lighter-coloured line.
If the difference between the x and y values is too small, the line will not be detected. If this occurs, try recalibrating the sensor.
What is next?