View Single Post
  #7   Spotlight this post!  
Unread 06-02-2007, 11:55
JBotAlan's Avatar
JBotAlan JBotAlan is offline
Forever chasing the 'bot around
AKA: Jacob Rau
FRC #5263
Team Role: Mentor
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Riverview, MI
Posts: 723
JBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond reputeJBotAlan has a reputation beyond repute
Send a message via AIM to JBotAlan Send a message via Yahoo to JBotAlan
Re: Desperate for help in camera tracking

Quote:
Originally Posted by itsme View Post
Ok, we have managed to make the camera track to the tilt direction. There is a little problem: the tilt bounces a bit, not something very significal. Here is our Tilt_Move code:

Code:
if(centroid_y<120-8) //there is a "-8" for making the range larger, avoids bounces
{
    Tilt_Rotation=Tilt_Rotation+1; //sets to rotate by 1
    SetPWM(Tilt_Servo_Port,Tilt_Rotation); //rotates
    wait(10); //gives time for the servo to spin
}

else if(centroid_y>120+8)
{
    Tilt_Rotation=Tilt_Rotation-1;
    SetPWM(Tilt_Servo_Port,Tilt_Rotation);
    wait(10);
}
What do you think about it?
That's just about exactly what I was hoping you'd do! Good job!

Is it slow at all? It seems like moving it by 1/255 of the servo's range would be somewhat slow. Maybe not. Don't listen to me if it's working...

Let me know if you need more help.

JBot
__________________
Aren't signatures a bit outdated?