Bluetooth Controlled Raspberry Pi Car with Computer Vision

In Spring semester 2019, as part of a self-chosen lab project for my CS333 (Digital Circuits and Computer Interfacing) course I designed a small RC car to be controlled via Bluetooth using a Raspberry Pi 3 B+ and a Wii remote. After sourcing some cheap hobbyist parts and assembling the vehicle together, I wrote the functionality of the car in about 100 lines of Python code, using the Wiimote's accelerometer values for the control logic. The crude video below shows the car in action. After finishing the Bluetooth control features, I additionally mounted a Raspberry Pi camera module to the front of the vehicle to add the capability for the vehicle to steer itself using the OpenCV Python computer vision library. The final vehicle design is shown below with the camera mounted on the front. Using the HSV color representation of objects in the vehicle's environment, in a few hundred lines of code I programmed the functionality for the car to track a basketball in its field of vision. The HSV range that the basketball's color fell between was used to create a filter to effectively select the ball, and then based on the location and size of the ball within the frame the car would move accordingly to follow it.

Raspberry Pi Car with camera mounted on front