View Single Post
  #5   Spotlight this post!  
Unread 20-02-2007, 14:36
Tz0m Tz0m is offline
Registered User
FRC #0333
Team Role: Programmer
 
Join Date: Feb 2006
Rookie Year: 2006
Location: New York
Posts: 17
Tz0m is an unknown quantity at this point
Re: Autonomous calculations

Thanks for the help. Just for testing, we tried using the tilt servo value to get it to stop. This is our code:
Quote:
if (Get_Tracking_State() == CAMERA_ON_TARGET)
{
if ((int) TILT_SERVO < 170)
{
pwm13 = pwm14 = 104;
pwm15 = pwm16 = 157;
}
else if ((int) TILT_SERVO > 170)
{
pwm13 = pwm14 = pwm15 = pwm16 = 127;
}
}
else if (Get_Tracking_State() == SEARCHING)
{
pwm13 = pwm14 = pwm15 = pwm16 = 127;
}
However, the robot continues to drive forward. The camera seems to stop moving once we initiate autonomous mode. We have these three functions, Servo_Track(); Camera_Handler(); and Tracking_Info_Terminal();, called right after Getdata(&rxdata);.

Last edited by Tz0m : 20-02-2007 at 16:21.