Fc 51 Ir Sensor Datasheet May 2026

int sensorValue = 0; int objectDetected = false;

Note on 4-pin versions: Some FC-51 modules break out an additional pin, which provides the raw analog voltage from the phototransistor before it goes into the comparator. This can be used for measuring distance more precisely. 3. Technical Specifications (Derived from FC-51 Datasheet) The following specifications are typical for the standard FC-51 module. Always check your specific vendor datasheet, but the values below are industry-standard. Fc 51 Ir Sensor Datasheet

// If sensor reads LOW (object detected) if (sensorValue == LOW) objectDetected = true; digitalWrite(ledPin, HIGH); // Turn LED ON Serial.println("Obstacle Detected!"); int sensorValue = 0; int objectDetected = false;

void setup() pinMode(irSensorPin, INPUT); pinMode(ledPin, OUTPUT); Serial.begin(9600); Serial.println("FC-51 Obstacle Detector Ready"); The sensor is detecting the floor or table surface

A: You may have set the sensitivity too high. The sensor is detecting the floor or table surface. Turn the potentiometer counter-clockwise until the detection stops.