Adafruit ALS-PT19 Licht Analog-Sensor Breakout
Add a teeny analog light sensor, the ALS PT19 analog light sensor is a great way to upgrade a project that uses a photocell and needs RoHS compliance. Due to the high rejection ratio of infrared radiation, the spectral response of the ambient light sensor is close to that of human eyes.
It's a pretty simple sensor - connect - to ground, + to 2.5V-5.5V or so to power it. Now measure the analog voltage on the OUT pin. That's it! The voltage will increase when the sensor detects more light.