Simulation of LDR sensor

Simulation

Click on the start simulation button and then click on LDR sensor you will see a slider to adjust the intensity of light.

Try to move slider and see the change of value in the serial monitor by clicking on the serial monitor button.

As the light intensity is changing the brightness of  LED varies accordingly.

 

In the below image, the slider of LDR is towards light

In the below image, the slider of LDR is towards dark.