Photoresistor

photoresistor

Image courtesy of SparkFun Electronics

A photoresistor (sometimes also known as a photocell, photodetector, or photoconductive cell) changes resistance depending on the amount of light it is exposed to. Use it as a variable component of a voltage divider circuit to build an analog light sensor.

Buy a photoresistor from Amazon, Sparkfun, Adafruit, or Newark.