Photoresistor With Arduino

Photo resistors, also called LDR (light-dependent resistors), is a semiconductor component. It exhibits photoconductivity.

Night light and photography light meters use photoresistors. Their latency property is used in audio compressions and outside sensing. They can be found in alarm clocks, outdoor clocks, solar street lamps etc

Interfacing Photoresistor With Arduino

Microcontroller is not necessary to make LDR work. Circuits use photoresistors as well. The resistance value is maximum when disclosed to light and minimum in dark. 



  1. Arduino Uno
  2. LED (light emitting diode)
  3. Bread board
  4. Pin to pin jumper wires


Follow the circuit diagram below to make connections


					int LED = 13;
void setup()
    pinMode(LED, OUTPUT);
void loop()
    unsigned int AnalogValue;
    AnalogValue = analogRead(A0);
        digitalWrite(LED, HIGH);
        digitalWrite(LED, LOW);


Once the code is uploaded, open serial monitor and observe the readings. Change the value in conditional statement (IF) by observing the value to make the sensor perform actions at day time or at night

Leave a Reply

Your email address will not be published.