// Since output is Active LOW, "LOW" means object detected if (sensorState == LOW) digitalWrite(ledPin, HIGH); Serial.println("Obstacle detected!"); else digitalWrite(ledPin, LOW); Serial.println("Path clear");
FC-51 IR Proximity Sensor - am I doing it wrong? - Arduino Forum Fc 51 Ir Sensor Datasheet
A small trim-pot used to adjust the sensitivity and detection distance. Indicator LEDs: Power LED: Glows when the module is powered. Signal LED: Lights up when an object is detected. Pinout Configuration // Since output is Active LOW, "LOW" means