The same PWM code that controls a servo for Arduino will work to drive a speed controller. Disconnect the power (red) lead of a std pwm cable, just connect the white (signal) and ground.
Motor is off when servo receives the same signal as 'centering' a servo (90 degrees) 'Zero degrees' is full reverse to the motor, 180 degrees full forward. Signal should look like this:
Another very good explanation is here:
http://team358.org/files/electrical/PWMGenerator.pdf