We finally got the camera hooked up, and from before, I came up with the code to have the camera track without using pots. We have our camera directly attached to a turntable and the turntable is pwm01. The code we are using is:
Code:
if (PAN_SERVO > 210)
{
pwm01 = 254;
Switch3_LED = 0;
}
else if (PAN_SERVO > 170)
{
pwm01 = 180;
Switch3_LED = 0;
}
else if (PAN_SERVO > 150)
{
pwm01 = 150;
Switch3_LED = 0;
}
else if (PAN_SERVO > 133)
{
pwm01 = 140;
Switch3_LED = 0;
}
else if (PAN_SERVO < 120)
{
pwm01 = 110;
Switch3_LED = 0;
}
else if (PAN_SERVO < 100)
{
pwm01 = 100;
Switch3_LED = 0;
}
else if (PAN_SERVO < 60)
{
pwm01 = 60;
Switch3_LED = 0;
}
else if (PAN_SERVO < 40)
{
pwm01 = 30;
Switch3_LED = 0;
}
else
{
pwm01 = 127;
Switch3_LED = 1;
}
Am I suppose to put this in Process_Data_from_Master_uP() or Default_Routine()? Also, does anyone see any problems in this, or am I suppose to call any functions before this or what. Because the camera just goes to the default position and doesn't move when we turn it on. It doesn't say "searching..." or anything in the Terminal Window. The camera doesn't even tilt, so i know something is wrong. It is getting power, it is plugged into the TTL port and all of that. So any help would be appreciated since it is one of the last days
Thanks,
Idaman323
__________________
TEAM 1706
2007 Judges Award, St. Louis (For our amazing ability to have bad luck)
2005 Rookie Inspiration Award, St. Louis