|
Re: No Tracking During Autonomous
To receive data from the camera, you have to call Camera_Handler(). To make the camera servos track the light, you have to call Servo_Track(). Add those two lines to the User_Autonomous_Code() function, immediately after the call to Getdata(&rxdata).
You should also remove the call to Generate_Pwms() and replace it with a call to PWM(pwm13,pwm14,pwm15,pwm16) instead. Kevin's camera code uses non-twitchy interrupt-based signal generation for those pins, and calling IFI's software-based routine will cause conflicts and give unusable output.
To "turn off" the camera, just stop calling Camera_Handler() and Servo_Track() from inside Process_Data_From_Master_uP().
In any code file where you want to use printf(), you need to #include <stdio.h> at the top of the file. The camera code doesn't do that for user_routines_fast.c, so you'll have to add it yourself.
|