when your target is at the required distance. Then confirm that the LED turns off when the target is moved slightly farther away.
Sensor works perfectly for 5 minutes, then constantly detects obstacle.
Double-check your jumper wires against the physical labels printed on the FC-51 PCB. fc 51 ir sensor datasheet hot
Place the FC-51 inside a dark drawer or wardrobe. The moment you open it, the sensor detects the change in reflection (or your hand reaching in) and turns on an LED strip. No more fumbling for clothes in the dark.
and observe the two on‑board LEDs:
const int sensorPin = 2; // IR sensor output pin const int ledPin = 13; // Built-in LED
: Look for solder bridges or stray wires touching between the pins on the sensor board. FC-51 IR Sensor Datasheet Summary when your target is at the required distance
The FC-51 module relies on three primary hardware components, any of which can become the source of heat: