This code will track an orange ping pong ball using a web cam mounted on a pan and tilt servo set up. You may need to tweak some of the parameters depending on your camera and servos.
The servos used in the video were natively limited to 0 - 90 degrees, therefore the code does not support travel outside this range.
Demo Video here
- 1x DC Barrel Jack
- 1x Pan Tilt Kit
- 2x Sub micro servo
- 1x Micro Maestro 6-channel usb servo controller
- 1x 5V DC 2A Barrel Jack power supply
- 1x USB mini b cables
- 1x Webcam Gembird 8 megapixel