Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task main()
- {
- SetSensorLight(S3);
- int S=0;
- while(true);
- {
- S=Sensor(S3)
- if (S<30) {
- OnFwd(OUT_A, 50);
- Off(OUT_C);
- }
- if (S>70) {
- OnFwd(OUT_C, 50);
- Off(OUT_A);
- }
- if (S<70) {
- if (S>30) {
- OnFwd(OUT_AC, 70);
- }
- }
- Wait(1);
- }
- }
Add Comment
Please, Sign In to add comment