const int irSensorPin = 18;
const int ledPin = 19;

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

void loop() 
{
  int sensorValue = digitalRead(irSensorPin);
  if (sensorValue == LOW) 
  {
    digitalWrite(ledPin, HIGH);
    Serial.println("Object Detected: LED ON");
  } 
  else 
  {
    digitalWrite(ledPin, LOW);
    Serial.println("No Object: LED OFF");
  }
  delay(100);
}
