|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
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.
![]() |
|
#2
|
|||||
|
|||||
|
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
Make sure that your camera is calibrated, and that you replaced the 3 values for the camera initialization code in the initialization function. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Scripting Setup and the Camera + Serial Port Drivers | CJO | Programming | 22 | 11-01-2006 17:42 |
| Camera Tracking Woes | VideoMan053 | Programming | 4 | 29-01-2005 18:09 |
| Camera Color Recognition Problem? | AnkurG | Technical Discussion | 3 | 20-01-2005 21:52 |
| Camera Problem | n_0163 | Electrical | 3 | 14-01-2005 21:10 |
| CMUCam2 Camera Code - Are important parts commented out? | Mr. Lim | Programming | 4 | 14-01-2005 12:11 |