View Single Post
  #9   Spotlight this post!  
Unread 16-02-2006, 08:06
Donut Donut is offline
The Arizona Mentor
AKA: Andrew
FRC #2662 (RoboKrew)
Team Role: Engineer
 
Join Date: Mar 2005
Rookie Year: 2004
Location: Goodyear, AZ
Posts: 1,307
Donut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond reputeDonut has a reputation beyond repute
Re: Camera Cycling And Angle

Quote:
Originally Posted by Denz
During the search mode, the camera does it's first sweep, and then when it moves back to make it's second sweep with a higher angle, the camera catches a glimpse of the light, but not enough to lock, so it restarts the search function from the beginning. This continues over and over, and the camera never locks! Any suggestions? Thanks.
We had the same problem. A very simple way to fix this is to change the values the camera goes to for pan and tilt when it begins a new search. Where the code is for the new search check, we changed our code to this...

Code:
if(new_search == 1)
{
	new_search = 0;
	//temp_pan_servo = 0;
	temp_pan_servo = (int)PAN_SERVO;
	//temp_tilt_servo = TILT_CENTER_PWM_DEFAULT;
	temp_tilt_servo = (int)TILT_SERVO;									
}
We commented out the old values and just changed the search to continue from the current servo positions (you will notice a temporary "freeze" of your camera when it outputs the same values for a second time after it finds and loses the target in the sweep).