The Light Sensor measures the intensity of visible light and tells you how dark or light the environment is.
The Light Sensor transforms the ambient light level to voltage level that can be converted into digital signals and read by the microcontroller for calculating the illuminance in lux. When the light intensity is lower than a certain level, which is called ‘the LOW Threshold’, the sensor detects a ‘DARK environment’. When the light intensity is above a ‘HIGH Threshold’, it detects a ‘LIGHT environment’.
Try to use the LOW/HIGH Threshold to trigger events like turn on the buzzer when there is no light.
Connect the circuit as shown below, then press the buttons and see what will happen.
Human Eye, Camera