When you move P2 (the control), the motor will be energized to actuate on P1 until the voltage applied to the circuit reaches the same value of the voltage applied by P2. Observe that P1 must be ganged to the gearbox were the motor is installed. The circuit can operate with voltages starting at 6 V and can be adapted to use other operational amplifiers according to the motor requirements.
The same block can be used with external signals from sensors. It is sufficient to remove P2 and apply the signal directly to the 20 kΩ resistor. The voltage of this signal must be in the same range determined by the voltage divider formed by R1/P1 and R2.