For diagrams and code go to: https://www.elithecomputerguy.com/2019/07/photoresistor-light-sensor-with-arduino/
Photoresistors are analog sensors that allow your Arduino to determine the level of light in an environment.
Note: You can use either 5 or 3.3 volt power for this project, and you can use different values of resistors (4.7K or 10K). Just remember that using different resistors or voltage will change the value the sensor outputs.
Functional Parts in the Project:
Arduino Uno – https://store.arduino.cc/usa/arduino-uno-rev3
560 Piece Jumper Wire Kit – https://amzn.to/2MsCLjL
220 Ohm Resistors – https://amzn.to/2RiiMD9
Breadboard Kit – https://amzn.to/2Xih5ei
Photoresistor – https://amzn.to/2lfakbA