This is the basic outline that I came up with, where the camera is mounted on the cannon.
Quote:
// pwm1 = Camera Pan
// pwm2 = Camera Tilt
// pwm5 = cannon Pan
// pwm6 = cannon Tilt
if CamPanLeft
turn cannon right
if CamPanRight
turn cannon left
if CamTiltUp
rotate cannon down
if CamTiltDown
rotate cannon up
|
Also when a pwm > 125 is the motor/servo turning to the right or the left. Once I know that I can write more specific code.
Does the pan & tilt center change when you change the degrees of panning & tilting?