<< return to Pixycam.com

Sketch for other Pan Tilt Servos

I have a Pan Tilt SPT100 with HiTec HS485HB’s, I was wondering if anyone has a sketch.

I wonder how feasible it would be to mount a GoPro or other 1080P camera along side the Pan Tilt platform, so that the Pixy Cam can lock on to to a color code, and steer the Pan Tilt to stay centered on wherever the color code is on the frame

http://goo.gl/yZxXpk

Hi Marc,

Your idea is definitely possible. You could use the “pan/title example”:https://github.com/charmedlabs/pixy/blob/master/arduino/libraries/Pixy/examples/pantilt/pantilt.ino as a reference, and just add a slight position offset to compensate for the positioning of the GoPro.

Are you looking for example code to drive the SPT100? I haven’t used that system before, so maybe someone else with experience with it can chime in.

Good luck! Let me know if you have any more questions.

Scott

Sorry to hijack this old thread but I have a very similar question. I am using a pan/tilt servo like this one: http://www.robotshop.com/en/lynxmotion-pan-and-tilt-kit-aluminium2.html

Where in the code is it where we would add in this position offset to make the pan/tilt demo work? I can’t seem to find it.

Thanks!

Hello Andrea,
There are some limits in the configuration parameters:

http://cmucam.org/projects/cmucam5/wiki/Servo_Pane

For example, if you wanted to offset the pan servo, you could set the upper limit to 220 and the lower limit to -180.

Hope this helps!

Edward