View Single Post
  #10   Spotlight this post!  
Unread 13-01-2007, 17:44
iBheat's Avatar
iBheat iBheat is offline
Registered User
FRC #0418 (Lasa Robotics)
Team Role: Programmer
 
Join Date: Jan 2005
Rookie Year: 2004
Location: Austin, TX
Posts: 24
iBheat is on a distinguished road
Re: Question about CMUCAM servo output

Sorry about the Pan and Tilt confusion I wrote the code at 2 in the morning while being sick and taking a lot of medication. I have fixed the code above and the way it would work if it was on the left side of the rack would be that it would look to the left in order to put the light in the center and then the robot would turn to the left in order to be parallel to the light and then it would start moving forwards and if the center of the light moved because its getting closer then it'll adjust the left and right since the whole thing is a loop not just the individual tilts or pans so it checks the order every single loop to make sure that the robot stays parallel to the light. I haven't tested the code but I am pretty sure that it would do what you are trying to do even if its on the left or right side of the rack!