arduino resistance measurement?

Hi again. I have a photocell and was wondering if it was possible to use the arduino to measure the resistance from the cell.

Note: The photocell creates resistance depending on the light, 1k ohm in dark and 10k ohms in bright light.

Connect one end of the photocell to +5V and the other end to a 1K resistor. Connect the other end of the resistor to ground. Connect a wire from the resistor/photocell junction to an analog pin.

Call analogRead to read the value. The value will go up or down depending on how much light is hitting the photocell.

The photocell/resistor combination forms a voltage divider, which changes the amount of current flowing, depending on the changing resistance of the photocell. Measuring the voltage dropped by the photocell gives a measure of the resistance of the photocell.