Objective:
To detect the Light Intensity using LDR Sensor
Components Required
- Arduino Uno
- Light Dependent Resistor (LDR) Sensor
- Resistance (1K Ohm)
Connection Diagram
Program
void setup()
{
Serial.begin(9600);
}
void loop()
{
int sensorValue = analogRead(A0);
Serial.print(“Light Intensity is :”);
Serial.print(sensorValue);
}
Working
The output of the LDR sensor is accessed by the Arduino Uno and displayed. For more light intensities (Bright) the LDR allows more current and produces large values and for less light intensities (Dark) the LDR blocks the current flow and produces low values.
Output
The output value is : 1023 (for maximum brightness)
The output value is : 0 (for dark)