Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void loop(){
- readSensors();
- //if only the middle two sensors can see the black line
- if(leftFarReading<200 && rightFarReading<200 && (leftCenterReading>200 || rightCenterReading>200))
- {
- straight();
- }
- //otherwise goes to the leftHandWall method
- else
- {
- leftHandWall();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement