So would it be something like this or am I doing it wrong?
Code:
if(pan_error > (int)Tracking_Config_Data.Pan_Allowable_Error)
pwm01 = 200
else if(pan_error < -1 * (int)Tracking_Config_Data.Pan_Allowable_Error)
{
// calculate how far we need to step the pan servo
servo_step = pan_error / (int)Tracking_Config_Data.Pan_Gain;
pwm01 = 60
}
Is it anythign even relativly close to this..? Maybe someoen could helpme with this part.
Also.. this is the code for the Pan. But what now for the Tilt?
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis