View Single Post
  #2   Spotlight this post!  
Unread 18-02-2005, 15:00
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: Camera Tracking Problem

Could you post your current code? I think you're aware that in user_routines_fast.c there's a function called User_Autonomous_Code (Pretty sure, don't quote me on it.) well in that code you want to track your color.

Everytime you call camera_track_color it will set the camera back to its home position, defeating the point of tracking. So you want to only call it once. Here's how you would do it:
Code:
int Find_Color_Flag = 0; // Initialize a flag variable

if(Find_Color_Flag == 0) // If it hasn't been called yet
{
     camera_find_color(GREEN); // Find the color
     Find_Color_Flag = 1; // Set the flag to true
}

camera_track_update(); // Track the color
That should make it track the color green.

Make sure that your camera is calibrated, and that you replaced the 3 values for the camera initialization code in the initialization function.
__________________
http://www.mikesorrenti.com/