Power Braking:
celerate(4,0,35,1);
//accelerate both motors from 0 to 35 in 1 second
motorSpeed(4,35);
//set both motor speeds to 35
goFor(3);
//go for 3 seconds
motorSpeed(4,0);
//set both motor speeds to 0
goFor(3);
//go for 3 seconds
reverse(4);
//reverse all motors
motorSpeed(4,35);
//set motor speed to 35
goFor(1);
//go for 1 second
brake(4);
//shut motors off
Coasting:
motorSpeed(4,30);
//set motor speeds to 30
goFor(4);
//go for 4 seconds
motorSpeed(4,0);
//shut off motors