...
- Read the ultrasonic sensors and control the motor accordingly
The threshold can be any reasonable value for now. We can tune this later.
Left Ultrasonic
Sensor
Right Ultrasonic
Sensor
Action Left Motor Right Motor < threshold < threshold Go forward turn forward turn forward < threshold > threshold Turn right turn forward stop > threshold < threshold Turn left stop turn forward > threshold > threshold Go back (you are lost!) turn backward turn backward * The above is a general idea. You should make refinements to the logic as well as thresholds for the actual competition]] ></ac:plain-text-link-body></ac:link>!</p></li></ul></li></ul>