Datasheet
Pixy Pet Code Design
OK. That was fun, but how does it work?
The Pixy Robot code consists of two main control systems: Object Tracking with the Pixy Camera
and the pan/tilt mechanism and Object Following with the Zumo robot base.
Together these two systems produce a very natural looking response where the 'head' turns in
response to motion and the 'body' follows.
Both control systems are based on Feedback Control Loops. For a detailed explanation of how
Feedback Control works, see the Feedback Control Basics page in this guide.
Tracking Objects
Object tracking is implemented in the TrackBlock function. The hard work of object detection and
location is handled by the image processing system inside the Pixy camera. It analyzes the image
and identifies objects matching the color characteristics of the object being tracked. It then reports
the position size and colors of all the detected objects back to the Arduino.
In the Arduino, we use this information to adjust the pan and tilt servos to try to keep the tracked
object in the center of the field of view.
© Adafruit Industries
https://learn.adafruit.com/pixy-pet-robot-color-vision-follower-using-
pixycam
Page 31 of 40