If the target was within a 40 degree window our camera would lock on. Our whole robot was the turret

Once locked on, the program would take over the shooting.
The camera team was outstanding.
One of our students found a solution to the 'lock on any light source' syndrome. He programmed the camera to ONLY lock on the green light. It was so good that you could pass a lighted fluorescent work light in front of the target and the camera would ignore it. It showed up as a black band. As a safety bonus, we could only shoot with a good lock. Thus we would not shoot into the crowd or at the judges
Also, at our playing field, we had pieces of tape laid out on the floor for every 5 degrees of camera-to-target tilt. We than programmed our shooter for each increment to shoot into the center of the goal. This way the program would vary the speed of our shooter to shoot into the goal at any angle. We used a gear tooth sensor to keep the speed constant. We could shoot while moving forward and while stationary. We were working on a program to shoot while moving backwards.
Work great!
__________________
We Build Robots and Careers
World's - #1 seeded in Archimedes, WON Archimedes and made it to Einstein
2016 NC District - Guilford County. #13 seeded, Finalist. Won Quality award.
IN District - Tippecanoe. #4 seeded. Won Innovation in Control award.
IN District - Perry Meridian. #3 seeded. Finalist. Won Excellence in Engineering award.
IN District - State Championship. #1 seeded. Finalist. Won Excellence inn Engineering award.