What is different about the Sharp IR Sensor?

From ROBOTC API Guide
Jump to: navigation, search

Comparison to a Normal IR Sensor

A normal IR sensor can only tell if an object is bouncing back the IR light. There are times, however, when you also need to know how far away that object is. This is where the Sharp IR sensor comes into play. The Sharp sensor has a special detector that not only determines if there is light, but can also measure how far away an object is and return an analog value of the distance.

How it Works

The detector in the Sharp IR sensor is similar to the imaging sensor found in digital cameras. Since the detector and the IR LED have a fixed distance and orientation relative to each other, the distance of an object will affect the angle at which the light from the IR LED hits the receiver. By looking at where the light hits the detector, it is possible to calculate the angle of the light and from that angle derive the distance to the object (all of which is done by the sensor itself).

The Sharp IR sensor can detect object distance.