Photo resistor to motor, increments

I am trying to make a circuit that when the photo resistor sees a change of light, it moves the motor for a certain delay and holds that position. Then when the photoresistor goes dark again it rotates again at another delay and holds that position and so on. Finally, at the end position I would like the motor to return to initial position. Need help with code! Please.

Ok first things first....

Have you done any of the tutorials like this one at adafruit that gets an LDR working?

Then secondly.... what type of motor do you have in mind, say a stepper or a servo or a dc motor with an encoder or what? They all need different approaches.....