const int LDR_PIN=11;
const int LED_PIN=12;
void setup() {
// put your setup code here, to run once:
pinMode(LDR_PIN, INPUT);
pinMode(LED_PIN, OUTPUT);
}
void loop() {
// put your main code here, to run repeatedly:
if (digitalRead(LDR_PIN) == LOW) {
digitalWrite(LED_PIN,LOW);
}
if (digitalRead(LDR_PIN) == HIGH) {
digitalWrite(LED_PIN,HIGH);
}
delay(100);
}