Using an LDR as a light sensor.

The light dependant resistor can be used as a sensor in your project by simply adding it in series with a 220 ohm resistor.