Automatic street light project
I made automatic street light project using Arduino Uno and LDR sensor. Do you want to know how to make it? Why are you waiting, visit Shiva the CREATOR .
Full code:
int ldr = 7;
int x;
int led = 13;
void setup()
{
Serial.begin(9600);
pinMode(7, INPUT);
pinMode(13, OUTPUT);
}
void loop()
{
x = digitalRead(7);
Serial.println(x);
if(x == HIGH)
{
digitalWrite(13, HIGH);
}
if(x == LOW)
{
digitalWrite(13, LOW);
}
}

This comment has been removed by the author.
ReplyDelete