The transmitter LED emits IR ranges with the wavelength of 700nm to 1 mm which is invisible to the eyes. The IR sensor consists of LM393 comparator IC, a variable resistor, a power LED, an infrared transmitter LED, and a photodiode receiver LED. The IR sensor is a useful sensor in the electronics community to detect objects using IR (Infrared Rays).
Also, print the status of object detection on the serial monitor.
Write a python code to detect objects and turn on or off external led accordingly.