In this tutorial, we will learn to turn on light automatically by using LDR Sensor with Arduino.
An LDR sensor (Light Dependent Resistor) is a device that is used to detect light. It detects the light intensity. We use it to control the lights, when there is dark it detects light intensity and blows the lights. As it mainly used in mobiles for auto-brightness and smart street lights.
Code for Testing LDR Output
Output Of LDR Testing
Code for LDR Sensor with Arduino
By using below code we can turn on/off lights automatically on detect of light/dark.
Output of LDR and LED with Arduino