Advertisement
Guest User

Untitled

a guest
Jul 18th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. void loop(){
  2. readSensors();
  3. //if only the middle two sensors can see the black line
  4. if(leftFarReading<200 && rightFarReading<200 && (leftCenterReading>200 || rightCenterReading>200))
  5. {
  6. straight();
  7. }
  8. //otherwise goes to the leftHandWall method
  9. else
  10. {
  11. leftHandWall();
  12. }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement