In my project, I'm making a robot using two hover board motors, a motor control board such as this one: https://www.ebay.com/p/2242827374?iid=162674407600 and a raspberry pi. I've connected the motor to the motor controller board, and the motor controller board to the motor. The motors work fine, I can run a function that makes the motors spin forward or backward. The one problem is the speed. I read that a pin on the motor controller board[VR pin] controls the speed. When running the motor, it is meant to simply take a parameter that controls the speed of the motor. However the motor only runs at max speed regardless of what number I use in the parameter. Thank you in advance and let me know if you need any more details.
You're looking for an electronic speed controller. Be careful to check that the one you purchase supports forward AND reverse if you need both directions, and that they're rated for the voltage and current that you need.
The electronic speed controllers should take a PWM signal, but also you can check the datasheet for specifics.