I haven't examined it yet, but Team 1114 released C++ beta test code that has basic color tracking autonomous functionality implemented on their 2007 robot. You may elect to see how they did it:
Click here.
From their site:
"The C++ code developed for teleoperated control of the robot. It includes examples of an IterativeRobot with one-joystick drive and simple arm control, as well as some convenience classes we wrote for double solenoids and the Logitech Dual Action Gamepad.
Also included is an autonomous mode that tracks the green light and scores a tube on a spider leg, as well as a class for doing PID calculations 1114-style."
(Yes, I know, I linked to a certain intermediate website instead of providing the direct link. Tough cookies!

)