Arduino Read LDR Value

Reading Light Dependent Resistor value from arduino is simple. Make sure your setup looks as follows:

LDR connected to arduino
LDR connected to arduino

The code to drive arduino:

int ldr = A0;

// the setup routine runs once when you press reset:
void setup() {
// initialize the digital pin as an output.
Serial.begin(9600);
}

// the loop routine runs over and over again forever:
void loop() {
delay(1000);
float ldrValue = analogRead(ldr);
Serial.println(ldrValue);
delay(1000);

}

Make sure your LDR is exposed to some light source and you will see change in values:

LDR on Arduino
LDR on Arduino