Now you are ready to observe the output of a USB webcam connected to your car. This is quite straightforward; simply plug in a USB webcam and download a video viewer. One such video viewer that works well is guvcview
. To install this, type sudo apt-get install guvcview
.
With all these tools installed, you can now run vncview
. When you are viewing the graphical screen of Raspberry Pi Zero type guvcivew –r 2
and you will be able to see the video from the webcam. You can control your RC car remotely by running the xcmodControl.py
program that you wrote earlier. The screen will look similar to the following screenshot:
You will notice that as you adjust the resolution down, the update rate goes up; this is related to the size of the image. There are a lot of additions that you can make to your Raspberry Pi controlled car, such as adding the joystick control or more autonomy. However, let's move on to the next project.