task main() { initializeRobot(); waitForStart(); // Wait for the beginning of autonomous phase. /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// //// //// //// Add your robot specific autonomous code here. //// //// //// /////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////// waitForStart(); { moveStraight (-50,500); move (50,-50,373); movearm (75,700); movehand (160); movearm (75,600); movehand (110); moveStraight (-30,1480); movearm (75,700); } while (true) {} }
task main() { initializeRobot(); waitForStart(); // Wait for the beginning of autonomous phase. { if(SensorValue[IRSeeker] == 7) //right { //...turn left. moveStraight (-50,115); move (50,-50,481); movearm (75,700); movehand (160); movearm (75,600); movehand (110); moveStraight (-30,1850); movearm (75,750); moveStraight (50,400); move (-50,50,400); movearm (-75,1400); movehand (250); moveStraight (50,600); } else if(SensorValue[IRSeeker] <= 5) //left { moveStraight (-50,1900); move (50,-50,420); movearm (75,700); movehand (160); movearm (75,600); movehand (110); moveStraight (-30,540); movearm (75,-1000); moveStraight (50,200); } else if(SensorValue[IRSeeker] == 6) //middle { moveStraight (-50,860); move (50,-50,421); movearm (75,700); movehand (160); movearm (75,600); movehand (110); moveStraight (-30,1350); movearm (75,850); moveStraight (50,1400); } } while (true) { return; } }
task main()//MAIN TASK { movingforward(50, 350);//CALLING ALL FUNCTIONS! CALLING ALL FUNCTIONS! REPORT TO YOUR STATIONS! WE GOT A ROBOT TO RUN HERE! turningrightslight(); movearm(50, 380); movingforward(50, 2000); movetreads(); backup(); turningleft(); movingforward(50, 1500); turningright(); movingforward(50, 2000); }
task main() { initializeRobot(); waitForStart(); // Wait for the beginning of autonomous phase. { if(SensorValue[IRSeeker] == 7) //right { //...turn left moveStraight (-50,115); move (50,-50,460); movearm (75,700); movehand (160); movearm (75,600); movehand (110); wait10Msec (10); moveStraight (-15,2700); movearm (75,750); moveStraight (50, 1000); movearm (-40,1300); movehand (150); movearm (-40,900); } else if(SensorValue[IRSeeker] <= 5) //left { moveStraight (-50,1755); move (50,-50,429); movearm (75,700); movehand (160); movearm (75,600); movehand (110); wait10Msec (100); moveStraight (-30,368); movearm (75,725); moveStraight (50,200); move (50,-50,300); movearm (-40,1300); movehand (150); movearm (-40,900); } else if(SensorValue[IRSeeker] == 6) //middle { moveStraight (-50,790);//Was 810 move (50,-50,412); movearm (75,700); movehand (160); movearm (75,600); movehand (110); wait10Msec (100); moveStraight (-15,1970);//was 2030 movearm (75,735); moveStraight (50,400); move (-50,50,600); movearm (-40,1300); movehand (240); movearm (-40,900); moveStraight (50,200); } } while (true) { return; } }