Line Following with ODS
Last updated
Was this helpful?
Last updated
Was this helpful?
Begin by mounting your ODS sensor downwards to that it can sense the black line on the floor.
Plugging your ODS sensor into the A7 port, use the diagnostic tool to measure its reading on the floor, on the tape, and half on the floor, half on the tape... write these down.
Entirely on the floor
Half on the floor, half on the tape
Entirely on the tape
Use the following code to let your robot follow the black line. You will need to change the desired value to the reading you got when the sensor was half on the tape and half on the floor. You may also need to adjust the gain!