const int ldrpin = 13;
const int led1 = 12;
const int led2 = 11;
const int led3 = 10;
const int led4 = 9;
void setup(){
pinMode(ldrpin, INPUT);
pinMode(12, OUTPUT);
pinMode(11, OUTPUT);
pinMode(10, OUTPUT);
pinMode(9, OUTPUT);
}
void loop() {
int data=digitalRead(ldrpin);
if (ldrpin>=1000){
digitalWrite(12, HIGH);
digitalWrite(11, HIGH);
digitalWrite(10, HIGH);
digitalWrite(9, HIGH);
}
else {
digitalWrite(12, LOW);
digitalWrite(11, LOW);
digitalWrite(10, LOW);
digitalWrite(9, LOW);
}
}