Tags: LDR, LIght, Dependent, Resister,

LDR LIght Dependent Resister

  • 3.00 AED
    • Ex Tax:3.00 AED
    • Product Code: LDR
    • Availability: In Stock
    The photoresistor is generally uesd to take photosensitive resistor measurement, light control and photoelectric conversion (light changes into electricity). The resistance light dependent resistor change with the change of the strength of incident ray (visible), in the dark conditions, its resistan..


    The photoresistor is generally uesd to take photosensitive resistor measurement, light control and photoelectric conversion (light changes into electricity). The resistance light dependent resistor change with the change of the strength of incident ray (visible), in the dark conditions, its resistance up to 1MΩ, when light conditions, it resistance only keeps 10-20KΩ. 


    LDR interfacing with arduino Tutorial | Light Dependent Resistor









     Arduino Connections

    Picture of Arduino Connections
    Picture of Arduino Connections
    Picture of Arduino Connections
    Picture of Arduino Connections
    3 More Images

    The green wire connect to digital 13 from resistor leg

    The brown wire connect to GND from LED short leg

    The purple wire connect to +5V from LDR

    The yellow wire connect to A0

    The white wire connect to GND


    Code

    Picture of Code

    const int ledPin = 13;

    const int ldrPin = A0;

    void setup() {

    Serial.begin(9600);

    pinMode(ledPin, OUTPUT);

    pinMode(ldrPin, INPUT);

    }

    void loop() {

    int ldrStatus = analogRead(ldrPin);

    if (ldrStatus <=300) {

    digitalWrite(ledPin, HIGH);

    Serial.println("LDR is DARK, LED is ON");

    }

    else {

    digitalWrite(ledPin, LOW);

    Serial.println("---------------");

    }

    }

    There are no reviews for this product.

    Write a review

    Please login or register to review