View Single Post
  #1   Spotlight this post!  
Unread 27-01-2007, 10:14
bronxbomber92 bronxbomber92 is offline
Registered User
FRC #1551 (Grapes of Wrath)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Naples
Posts: 75
bronxbomber92 is an unknown quantity at this point
Moving bot once targeted on the light

Hey, I have this piece of code
Code:
if( Get_Tracking_State() == CAMERA_ON_TARGET )
{
    Switch3_LED = 1;
    pwm10 = pwm08 = 135;
}
else
{
    Switch3_LED = 0;
    pwm10 = pwm08 = 127;
}
Really, it's just the code from the Process_Data_From_Master_uP() in user_routines.c that checks if the camera has targeted the light. pwm10 and pwm08 are the pwms that the wheels are connected to. I was hoping to get very slow movement by setting it to 135.

Once I found that didn't work. I tried controlling a small motor I setup to it that I had earlier controlled with a potentiometer. That to didn't work.

Any reason why this isn't working?

Thanks,
Jedd
Team 1551