Mh Sensor Series Flying Fish Ir Sensor Datasheet Fixed May 2026

Here are the verified specifications. Ignore any PDF that claims different voltages or pinouts without looking at the back of the board.

if (sensorState == LOW) { // Object is close digitalWrite(ledPin, HIGH); Serial.println("Object Detected!"); } else { digitalWrite(ledPin, LOW); Serial.println("Clear"); } delay(100); }

Stop reading the fake datasheet and run this code instead: Mh Sensor Series Flying Fish Ir Sensor Datasheet Fixed

Your potentiometer is mis-set. Turn the blue box trimmer counter-clockwise. The Flying Fish has a digital output, not analog. The pot adjusts the threshold . If the threshold is too low, it will always read "1" (nothing detected).

If your sensor isn't working like the "broken" datasheet said, here is the troubleshooting guide: Here are the verified specifications

void loop() { int sensorState = digitalRead(sensorPin);

Decoding the MH Flying Fish IR Sensor: Why Your Datasheet is Broken (And How to Fix It) Turn the blue box trimmer counter-clockwise

The datasheet says "20cm"? Lie. This is a proximity sensor, not a distance sensor. Max reliable range is ~2.5cm (1 inch). If you need long range, buy an ultrasonic or Time-of-Flight (VL53L0X) sensor.

Scroll to Top