const int ledPin = 10;  
const int ldrPin = A0;
int ldrStatus;

void setup() {
  Serial.begin(115200);
  pinMode(ledPin, OUTPUT);
  pinMode(ldrPin, INPUT);
}

void loop() {
  ldrStatus = analogRead(ldrPin);
  Serial.println(ldrStatus);
  if (ldrStatus >= 800) {
    digitalWrite(ledPin, HIGH);
    Serial.print("Its DARK, Turn on the LED : ");
  } else {
    digitalWrite(ledPin, LOW);
    Serial.print("Its BRIGHT, Turn off the LED : ");
  }
}
