Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- task main(){
- SetSensorLowspeed(IN_1);
- SetSensorLowspeed(IN_4);
- SetSensor(S2, SENSOR_COLORRED);
- SetSensor(S3, SENSOR_COLORRED);
- while(true)
- {
- if(Sensor(IN_2)<=30 && Sensor(IN_3)<=30)
- {
- OnFwd(OUT_AC, 75);
- }
- else if(SensorUS(IN_1)<10)
- {
- RotateMotor(OUT_C, 75, 600);
- OnRev(OUT_AC, 75);
- }
- else if(SensorUS(IN_4)<7)
- {
- RotateMotor(OUT_B, 75, 50);
- RotateMotor(OUT_A, 75, 600);
- OnFwd(OUT_AC, 75);
- }
- }
- }
Add Comment
Please, Sign In to add comment