Performance Test 3

Code for Performance Test 3

reverse(4);     //Reverse all motors

celerate(4,0,30,0.5);  //Accelerate all motors from 0 to 30 in .5 seconds

motorSpeed(4,30);    //Run all motors at 30%

goToAbsolutePosition(72);  //Go to absolute position 72

celerate(4, 30, 0, 0.5);            //Accelerate motors from 30 to 0 percent in .5 seconds

brake(4);         //Brake all motors

goFor(9);        //Run for 9 Seconds at 0 speed

reverse(4);     //Reverse all motors

celerate(4,0,30,0.5);  //Accelerate all motors from 0 to 30 percent in .5 seconds

motorSpeed(4,30);    //Run motors at 30 percent

goToAbsolutePosition(30);  //Go to position 30

celerate(4, 30, 0, 0.5);            //Accelerate all motors from 30 to 0 percent in .5 seconds

brake(4);         //Brake all motors

 

// grab caboose
motorSpeed(4,0);      //All motors at speed 0
goFor(5);        //Go for 5 seconds
reverse(4);     //Reverse all motors
motorSpeed(4,15);    //Run motors at 15 percent
goFor(1);        //Go for 1 second

//pause and head back
motorSpeed(4,0);      //Run motors at 0
goFor(5);        //Run for 5 seconds
motorSpeed(4,60);    //Run motors at 60 percent
goToAbsolutePosition(-495);           //Go to position -495
motorSpeed(4,0);      //Run motors at 0
goFor(3);        // Go for 3 seconds