Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Camera Tracking Problem (http://www.chiefdelphi.com/forums/showthread.php?t=34910)

cprogrammer 18-02-2005 14:19

Camera Tracking Problem
 
Our camera won't track with the FRC code. We have the TTL adapter on the FRC controller and we have the power, TTL port, and the servo cables plugged into the camera. When we load the code the camera won't track the color we have selected. If we could get some help that would be great. :confused:

Mike 18-02-2005 15:00

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.


All times are GMT -5. The time now is 07:32.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi