How to control DC motor forward and reverse with one potentiometer

I know he needs an H-bridge, but all he asked was can he control a DC motor with a POT.
YES, he can. He will need a H- bridge, to supply the proper current to the motor, and if he wires it up correctly, the code I wrote will work.