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 orentation to eachother, the distance of a object will affect the angle at which the light bounces back. Now by looking at where the light hits the detector it is possible to calculate the angle or the light and then the distance of the object. This all happens on the sensor.

The Sharp IR sensor can detect object distance.