<< return to Pixycam.com

Finding Cameras Position to Turn Servo

Hello, I am new to Pixy so please work with me here. Imagine that there is a 180 degree arc with a center point, at that center point pixy and the pan/tilt mechanism is placed. Below pixy there is an arm (about two feet long) attached to a servo motor. The arc is at a maximum on 30 feet. When a person walks inside of that arc, pixy will detect he/she based upon a unique color. What I am needed help with is this: How can I get pixy to communicate with the servo attached to the arm, so wherever the person walks, the arm is pointed at the person. So in simple terms, how do I set up pixy to tell a servo to turn to the position of the camera? Thanks in advance.

Hello Jordan,
You might look at the “pantilt” Arduino demo in the Arduino library. It does a lot of what you describe. It detects an object and moves the servos such that Pixy is pointing at the object.

Hope this helps!

Edward