Quetion about servo tracking function in easyC pro

What does it exactly do? From my understandings it tracks the target (the centroid of the target) by moving the pan and tilt servos. But how do I tell it on witch port the servos are?

Are you referring to the kickoff demo code? There are constants defined in there for the pan/tilt servo ports. The default I believe is 10 for pan, and 11 for tilt. Hit F6 to see a list of macros and constants.

I was talking about the built-in function called: servo tracking.
BTW, in the kick-off demo it moves the servos too? I thought it only gives data about the target, and doesn’t move anything.

IIRC, the kickoff demo code doesn’t have anything built in for searching, but it does adjust the pan and tilt to stay centered on the target when it is acquired. The functions that do this I believe are called DistanceToPeg() and RotateToPeg().

I may be wrong here, but I think the built-in servo tracking functions require the servos to be connected to the camera board, and this isn’t possible with the 2007 camera.

I have my camera plugged into ports 10 and 11 for pan and tilt but it isnt working correctly. The camera will tilt to the ceiling or pan left until it stops and then it just sits there doing nothing… is there something that has to be changed or should it work??
–ty–

Is there anything else in the code that might be affecting pwms 10 and 11? If you were using the C18 compiler and the FIRST-provided code, I’d advise you to check especially Default_routine(), but I don’t know enough about EasyC to ask you anything more.