Using light to frequency sensor to control servos at different frequencies

Yeah, so that for instance when the sensor reads dark, I can put in a statement that will tell the servo to move a certain distance or for a period of time.