#define LDR_PIN 7
void setup() {
Serial.begin(115200);
pinMode(LDR_PIN, INPUT);
}
void loop() {
if(digitalRead(LDR_PIN)==LOW){
Serial.println("Dark detected");
} else{
Serial.println("light detected");
}
delay(1000);
// put your main code here, to run repeatedly:
}