Another interesting behavior of your tracked robot is the ability to find motion. Here is the first part of the code to use the OpenCV library and your webcam to follow motion:
The following is the second part of the code to use the OpenCV library and your webcam to follow motion:
It is useful to look at the code in detail. This first section of the code is very similar to the setup code you used in the colored object section:
#!/usr/bin/env python: This line allows the program to be executed as a regular program. ...