View Single Post
  #1   Spotlight this post!  
Unread 10-02-2007, 19:14
dpick1055's Avatar
dpick1055 dpick1055 is offline
David Pick
FRC #1739 (Chicago Knights)
Team Role: Alumni
 
Join Date: May 2005
Rookie Year: 2004
Location: Chicago
Posts: 75
dpick1055 is on a distinguished road
Send a message via AIM to dpick1055
Getting the camera to work in autonomous

I've now got the camera working in human operated mode but when we switch over to autonomous nothing happens. I've also included tracking.h in user_routines_fast.c, Our code currently looks something like this:
Code:
Getdata(&rxdata);  
Camera_Handler();
Servo_Track();

if (Get_Tracking_State == TARGET_IN_VIEW)
    {
      pwm13 = pwm15 = 170;
    }
else
    {
      pwm13 = pwm15 = 127;
     }

Generate_Pwms(pwm13,pwm14,pwm15,pwm16);

Putdata(&txdata);
I was simply trying to see if i could get the motors to respond to what the camera was seeing. Is there some reason why this isn't working?
__________________
Always remember to take your powered wheels off the ground when first testing code. Otherwise you'll end up with holes in the wall like us