Guest User

Untitled

a guest
Jan 20th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. task main()
  2. {
  3. SetSensorLight(S3);
  4.  
  5. int S=0;
  6. while(true);
  7. {
  8. S=Sensor(S3)
  9. if (S<30) {
  10. OnFwd(OUT_A, 50);
  11. Off(OUT_C);
  12. }
  13. if (S>70) {
  14. OnFwd(OUT_C, 50);
  15. Off(OUT_A);
  16. }
  17. if (S<70) {
  18. if (S>30) {
  19. OnFwd(OUT_AC, 70);
  20. }
  21. }
  22. Wait(1);
  23. }
  24. }
Add Comment
Please, Sign In to add comment