RPi RC Car – Regulating Speed & Measuring Distance

Hey everyone, I’m planning out one of my first Raspberry Pi projects, an RC car line follower using openCV, and I’m looking for some suggestions on how I can tackle some challenges. The two challenge I am unsure about is speed regulation and distance measuring.

I would like to be able to control my car from my phone, telling it how fast to drive along the line. What is the best way for me to measure my robots’ speed, and are there any resources that anyone could recommend for learning about PWN / motors? Ideally I could instruct my robot to drive X mph, and then it can regulate its speed and stay at that constant speed.

My second challenge is going to be distance measuring. I’m assuming the best way to estimate distance is using wheel rotations, so I’m looking for some suggestions on how I can accurately measure wheel rotations to convert to distance travelled.

If anyone could provide any suggestions or resources to learn about tacking these issues, it’d be very appreciated!

submitted by /u/swiftmiles
[link] [comments]