speed control for E scooter (24V motor )to 6 KM/H steady.

Hi
I am using the Arduino Uno and quad encoder .
I would like to control a E scooter (24V motor )to 6 KM/H steady.
The software need to read the throttle output (0-5v) compare it with the encoder reading (calculating the speed) and reduce throttle value or change throttle value to reach 6 KM/H steady.
If someone could help I would appricate any help
I don’t have any backround with software .

Avraham

First, consider using of H-bridge. This might be a good option.

It is dual, so you need to find single motor driver.