Whilst getting input from a potentiometer can be useful for human controlled experiments, what do we use when we want an environmentally controlled experiment?
We use exactly the same principles but instead of a potentiometer (twist based resistance) we use a photo resistor (light based resistance). The Metro cannot directly sense resistance (it senses voltage) so we set up a voltage divider. The exact voltage at the sensing pin is calculable, but for our purposes (just sensing relative light) we can experiment with the values and see what works for us. A low value will occur when the sensor is well lit while a high value will occur when it is in darkness.