Code

celerate(1,0,15,2.5); // accelerate motor one from 0% speed to 15% speed in 5 seconds

motorSpeed(1,15); // run motor one at 15% speed  

goFor(1); // run state for 1 second

brake(1); // brake motor 1

celerate(2,0,27,4); // accelerate motor 2 from 0% speed to 27% speed over 4 seconds

motorSpeed(2,27); // run motor 2 at 27% speed

goFor(2.7); //continue for 2.7 seconds

celerate(2,27,15,1); // decelerate motor 2 from 27% to 15% over 1 second

brake(2); // brake motor 2

reverse(2); // reverse motor 2

celerate(4,0,31,2); // accelerate motor 4 from 0% to 31% speed over 2 seconds

motorSpeed(4,35); // set motor 4 to 35% speed

goFor(1); // run for 1 second

brake(2); //brake motor 2

motorSpeed(1,35); // set motor 1 to 35%

goFor(3); // run for 3 seconds

brake(4); //brake motor  

goFor(1); // run for 1 second

reverse(1); // reverse motor 1

celerate(1,0,19,2); // accelerate motor 1 from 0% to 19% speed over 2 seconds

motorSpeed(2,35); // set motor 2 to 35% speed

motorSpeed(1,19); // set motor 1 to 19%

goFor(2); // go for 2 seconds

motorSpeed(4,19); // set motor 4 to 19% speed

goFor(2); // go for 2 seconds

celerate(4,19,0,3); //decelerate motor 4 from 19% to 0% speed over 3 seconds

brake(4);// brake all motors