An automatic night lamp using arduino
When the LDR senses light in the room the lamp is kept turned off and when the room is dark the LDR senses this as well and the aarduino turns on the lamp.
The arduino reads analog values from the LDR and switches the lamp on or off based on the set value by the user.
In my case I've set the value as 500, check your own room's light intensity levels by trial and error and set up your code.