Tilt your robot upright so that the Line sensors are not pointing at the ground. |
Line sensors actually are not seeking colors, but are determining the Reflectivity of an object.
|
Your Task: You will create a different code sequence for each Line Tracker. If Left Sensor touches White, it should move Left. If the Right Sensor touches White, it should move Right. Look at the previous code you have written to have your robot move forward. Then, add an Operator that will trigger an "If/Then" statement to turn right if one of the two sensors touches White and then add another Operator to the other "If/Then" statement that will have the other motor turn left if the other sensor touches White. Key To Your Robot's Success...Program your robot so that it drives slowly!
Test Your Program. |