If you are using a speed controller on the motor, it isn't different than coding a regular FIRST motor. Firstly, you need to determine what speed controller it is (Victor or jag). Depending on which it is, the constructor will be something like
Code:
/*speed controller type*/ motor = new /*speed controller type */(4,/*pwm number on sidecar*/);
/*during teleport period...*/
motor.setSpeed(*/a double less than 1*/);
Hope this helps a tad, ill try to respond, budpt im in germany right now and wifi is sketchy here...