Advertisement
Guest User

Untitled

a guest
Feb 21st, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. task main()
  2. {
  3. wait(4.0);
  4. while(1==1)
  5. {
  6. if (SensorValue(Mlinefollower)>800)
  7. {
  8. startMotor(Rmotor, 66);
  9. startMotor(Lmotor, 60);
  10. }
  11. if (SensorValue(Rlinefollower)>800)
  12. {
  13. startMotor(Rmotor, -30);
  14. startMotor(Lmotor, 40);
  15. }
  16. if (SensorValue(Llinefollower)>800)
  17. {
  18. startMotor(Rmotor, 40);
  19. startMotor(Lmotor, -30);
  20. }
  21. if (SensorValue(Mlinefollower)<250 && SensorValue(Rlinefollower)<250 && SensorValue(Llinefollower)<250)
  22. {
  23. motor(Rmotor)=0;
  24. motor(Lmotor)=0;
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement