I need a slot car controller based on Arduino with speed control and brakes

I need a slot car controller based on Arduino with speed control and brakes. The motor speed is controlled with an H-bridge but the brakes are the problem. The brakes must be adjustable from no brakes to full brakes and everywhere in between and is controlled by a pot...
A Schematic and sketch would be very helpful.
Does anybody have some ideas?

Brakes on a slot car are provided by shorting the 2 rails together, turning the motor into a brake.

Some motor drivers provide for that.
What scale slot car?
How much current?

And can you provide more detail about what you are looking to do?

The H-Bridge does it all. Driving the motor forward causes acceleration. Driving the motor backwards causes braking. What motor controller are you using? If the motor controller has PWM and DIR pins then drive the PWM pin with a PWM output from the Arduino and the DIR pin with a digital output. One state will be forward and the other state will be backward.

You can use PWM on the brakes just the same as forwards/backwards.