Ping-Pong with a DC motor & a pot

So I should slow down the motor as I get closer to the limit?

Yes. Make the speed depend on the absolute value of the difference between the headRot value and the middle of the range. As the difference gets larger, slow down. As it gets smaller, speed up. The maximum speed, then, would be right in the center of the range.