Header Ads Widget

Understanding about the LDR (Light Dependent Resistor) and Arduino Program in Telugu

LDR (Light Dependent Resistor)  or Photo detector



In this article we know about the  LDR (Light Dependent Resistor)  or Photo detector, also know how to connect this  LDR to  Arduino and write the program.

first we know about  the LDR (Light Dependent Resistor)  or Photo detector and how it works . 

About LDR (Light Dependent Resistor)  or Photo detector :

LDR (Light Dependent Resistor)  or Photo detector is works based on light.the resistance of the LDR varies when light ibtensity is low and high , if the light value increase then the resitance of LDR (Light Dependent Resistor)  or Photo detector decrease .if the light value decrease then resistance value increase this may the LDR works. 

for more details watch the below video

 


 LDR (Light Dependent Resistor) LED ON and OFF  Arduino Program :

 


Components:

  • Arduino                            BuyNow
  • LDR                                 BuyNow
  • breadboard and wires      BuyNow
If you want to buy Arduino components, I am giving my affiliate links. If you buy the components using my affiliate links, it will help to our channel and website growth. so do these small help.

LDR (Light Dependent Resistor) LED ON and OFF CKT :

Understanding about the LDR (Light Dependent Resistor) and Arduino Program in Telug



LDR (Light Dependent Resistor) LED ON and OFF CODE :

int ldrpin=A0;
int ldrvalue;
int led1=7;
int led2=8;
int del=1000;

void setup() {
  // put your setup code here, to run once:
pinMode(ldrpin,OUTPUT);
pinMode(led1,OUTPUT);
pinMode(led2,OUTPUT);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
ldrvalue= analogRead(ldrpin);
Serial.println(ldrvalue);
if(ldrvalue> 100)
{
  digitalWrite(led1,HIGH);
  digitalWrite(led2,LOW);
}
if(ldrvalue < 100)
{
  digitalWrite(led1,LOW);
  digitalWrite(led2,HIGH);
}

}
if you have any doubts regarding to this project, contact me on Instagram or comment on YouTube video. I will help my best.

Post a Comment

0 Comments