Hello,
I am attempting to extract the pan and tilt values from the pan/tilt demo in the Arduino. Simply, I want to print them to the Serial Monitor. I assume (from reading the excerpt in italics below) that this data is derived from the center (x and y values) of the detected object. The reason, I wish to extract these, is to control another device in realtime. I am sure this is as simple as adding another println.
Thank you in advance,
Erik
The Pan/Tilt control is implemented using 2 instances of the ServoLoop class - one for the pan and one for the tilt. ServoLoop is a feedback control loop using both Proportional + Derivative (PD) control. The measurements are the x (for pan) and y (for tilt) positions of the blocks reported by the Pixy Camera. The setpoints are the x, y position of the center of the camera’s view. And the outputs are the servo positions
Here is a a link to an Adafruit project that uses this functionality: https://learn.adafruit.com/pixy-pet-robot-color-vision-follower-using-pixycam/the-code