Automatic Light System With Arduino
Source Code :
const int ledPin = 13;
const int ldrPin = A0;
void setup () {
pinMode(ledPin, OUTPUT);
pinMode(ldrPin, INPUT);
}
void loop() {
int ldrStatus = analogRead(ldrPin);
if (ldrStatus >= 400) {
digitalWrite(ledPin, HIGH);
delay(1000);
}
else {
digitalWrite(ledPin, LOW);
}
}
Site Link: Download Arduino IDE
💡💡💡💡💡💡💡 Contact Us 💡💡💡💡💡💡✅Mail 👉chayanroy70@yahoo.com
✅Facebook page 👉https://www.facebook.com/techtidpro
✅Facebook Group 👉 https://www.facebook.com/groups/techtidpro
✅Twitter 👉https://twitter.com/jnrchayan
✅Instagram 👉https://www.instagram.com/jnrchayan
0 Comments
Please do not enter any spam link in the comment box.