
Light Sensor: A must use sensor! This sensor is very important and is critical if you want to do well at an FLL competition. It is sensitive and precise. It reads light intensity from the surrounding environment, as well as the reflection from the infrared transmitter. The LED light source can be turned off for an accurate ambient light reading.
Tip: If you want to do well at your upcoming Nature's Fury competition, we highly suggest incorporating this sensor into one of your programs. It will impress your judges and give you a higher score on your Robot Design.
Tip: If you want to do well at your upcoming Nature's Fury competition, we highly suggest incorporating this sensor into one of your programs. It will impress your judges and give you a higher score on your Robot Design.
Following a Black-Line
These pictures and instructions will show you step by step light sensor programming to make your robot to follow a black line! If you are on a smart phone and you find pictures hard to see, switch the viewing mode to "web".
(Step 1) Drag out a loop. This makes your robot keep doing whatever is inside the Loop Block forever.
(Step 2) Then drag out a switch and place it inside the loop. Set the mode to Light Sensor and the compare to < 35. You may want to look at the pictures! The switch makes the robot switch between the two sides forever, (top & bottom) until told to stop.
(Step 3) Drag out six motor blocks total and place and set them as shown. Copy what is shown in the picture! Set each "forward motor block" at 45 power and infinite forward! This makes Motor-B move forward at 45 power until the Light Sensor detects a line which is less than 35 in reflected light. When the Light Sensor reads this black line, the program switches to Motor-C moving forward at 45 power until the Light Sensor detects a line which is less than 35 in reflected light. This results in the rapid right-left-right-left motion!
(Step 4) Good luck!
(Step 2) Then drag out a switch and place it inside the loop. Set the mode to Light Sensor and the compare to < 35. You may want to look at the pictures! The switch makes the robot switch between the two sides forever, (top & bottom) until told to stop.
(Step 3) Drag out six motor blocks total and place and set them as shown. Copy what is shown in the picture! Set each "forward motor block" at 45 power and infinite forward! This makes Motor-B move forward at 45 power until the Light Sensor detects a line which is less than 35 in reflected light. When the Light Sensor reads this black line, the program switches to Motor-C moving forward at 45 power until the Light Sensor detects a line which is less than 35 in reflected light. This results in the rapid right-left-right-left motion!
(Step 4) Good luck!
Review
Lets us go over what this program did:
(Function 1) Motor-B goes forward forever. While the Light Sensor simultaneously reads for reflected light which is less than 35.
(Function 2) Motor-B stops because the Light Sensor read the black line.
(Function 3) Because of the Switch, at nearly the same time as when Motor-B stopped, Motor-C started going forward forever. While the Light Sensor simultaneously reads for reflected light which is less than 35.
(Function 4) Motor-C stops because the Light Sensor read the black line.
(Function 5) Because of the Switch, at nearly the same time as when Motor-C stopped, Motor-B started going forward forever. While the Light Sensor simultaneously reads for reflected light which is less than 35.
(Function 6) As a result of the Loop, the steps continue forever when the Light Sensor reads the reflected light which is less than 35, causing... This was a slow motion break down of what the program was doing.
Congratulations, you completed the Following a Black-Line Program!
(Function 1) Motor-B goes forward forever. While the Light Sensor simultaneously reads for reflected light which is less than 35.
(Function 2) Motor-B stops because the Light Sensor read the black line.
(Function 3) Because of the Switch, at nearly the same time as when Motor-B stopped, Motor-C started going forward forever. While the Light Sensor simultaneously reads for reflected light which is less than 35.
(Function 4) Motor-C stops because the Light Sensor read the black line.
(Function 5) Because of the Switch, at nearly the same time as when Motor-C stopped, Motor-B started going forward forever. While the Light Sensor simultaneously reads for reflected light which is less than 35.
(Function 6) As a result of the Loop, the steps continue forever when the Light Sensor reads the reflected light which is less than 35, causing... This was a slow motion break down of what the program was doing.
Congratulations, you completed the Following a Black-Line Program!