Tracking Object with CMUcam4 issues

Hi! I’ve a little problem and I don’t know how to solve it, I’ve been working with arduino for 1 month so I’m not an expert. I’m trying to move a servo while the CMUcam isn’t “seeing” the object I’m tracking, I’ve managed to turn a LED on and off when the cam tracks the object or not but when I connect the servo it doesn’t work. I would really appreciate any help. Sorry for the bad english. This is my code so far:

#include <Servo.h>
#include <CMUcam4.h>
#include <CMUcom4.h>
#define RED_MIN 25
#define RED_MAX 140
#define GREEN_MIN 23
#define GREEN_MAX 71
#define BLUE_MIN 0
#define BLUE_MAX 33
#define NOISE_FILTER 10
#define PIXEL 60
#define CONFIDENCE 180
#define WAIT_TIME 5000
#define LED_BLINK 5
CMUcam4 cam;
CMUcam4_tracking_data_t data;
Servo servo1;
int pos=0;
int check;
void setup() {
pinMode(13,OUTPUT);
Serial.begin(250000);
delay(100);
cam.begin();
cam.LEDOn(LED_BLINK);
delay(WAIT_TIME);
cam.autoGainControl(true);
cam.autoWhiteBalance(true);
cam.LEDOn(CMUCAM4_LED_ON);
cam.colorTracking(false);
servo1.attach(10);
servo1.write(pos);
cam.noiseFilter(NOISE_FILTER);

}

void loop() {

cam.trackColor(RED_MIN, RED_MAX, GREEN_MIN, GREEN_MAX, BLUE_MIN, BLUE_MAX);
cam.getTypeTDataPacket(&data);
if(data.pixels< PIXEL){
if(data.confidence < CONFIDENCE){
check=0;
digitalWrite(13,check);

}
}
else{
check=1;
digitalWrite(13,check);
}

}

Thanks.

You're not writing to your servo, except in setup().

Please use code tags when posting code.

Sorry, posted the wrong code…
Here’s the other one:

#include <Servo.h>
#include <CMUcam4.h>
#include <CMUcom4.h>
#define RED_MIN 25
#define RED_MAX 140
#define GREEN_MIN 23
#define GREEN_MAX 71
#define BLUE_MIN 0
#define BLUE_MAX 33
#define NOISE_FILTER 10
#define PIXEL 60
#define CONFIDENCE 180
#define WAIT_TIME 5000
#define LED_BLINK 5
CMUcam4 cam;
CMUcam4_tracking_data_t data; 
Servo servo1;
int pos=0;

void setup() {
  
  Serial.begin(250000);
  delay(100);
  cam.begin();
  cam.LEDOn(LED_BLINK);
  delay(WAIT_TIME);
  cam.autoGainControl(true);
  cam.autoWhiteBalance(true);
  cam.LEDOn(CMUCAM4_LED_ON);
  cam.colorTracking(false);
  servo1.attach(10);
  servo1.write(pos);
  cam.noiseFilter(NOISE_FILTER); 
  
}

void loop() {
    
     cam.trackColor(RED_MIN, RED_MAX, GREEN_MIN, GREEN_MAX, BLUE_MIN, BLUE_MAX);
     cam.getTypeTDataPacket(&data);
     if(data.pixels< PIXEL){
      if(data.confidence < CONFIDENCE){
        pos+=20;
        servo1.write(pos);
        
      }
     }    
}

And in this context, what does " it doesn't work" mean?

The servo moves when there's nothing in front of the camera, and that's ok, but when I put the object in front of the camera the servo keeps moving.