How to make LDR Based street light controller using Tinkercad || Part-1 (CODE)
How to make LDR Based street light controller using Tinkercad || Part-1 (CODE)
int ldr=A5;
int ldr_value;
int light=3;
void setup()
{
pinMode(light, OUTPUT);
pinMode(ldr, INPUT);
}
void loop()
{
ldr_value=analogRead(ldr);
if (ldr_value>512)
digitalWrite(light, LOW);
else
digitalWrite(light, HIGH);
}
Making of this video is available on our YouTube channel.... watch that to understand easily...
Channel link : https://youtube.com/channel/UCj2DwYVQo7ZQgSbQ8AbG3Dw
Video link : https://youtu.be/B_s4zgT0-Vo
E-Mail : vikaashkumar313@gmail.com
LIKE||SHARE||SUBCRIBE
Comments
Post a Comment