I was just wondering if the SRF05 and the Sharp GP2D120 IR Sensor - 11.5" / Analogue have the same basic function (which I thought was simply scanning and analyzing what it sees)
Thanks a lot for the replies, they helped out figuring what I needed!
Both will give a distance reading to a nearby objects, but there are a few differences:
1) The biggest difference is that sonar sensors have a wide cone of detection, while the IR sensors have a very narrow beam of detection. This determines what objects they can detect. For instance, if you are near a chair, but the sensor is not pointed directly at the let (maybe it's off by a few degrees), the IR will not sense the object, while the sonar will detect the chair leg. This can be good. However, in the case where you approach a doorway, the sonar sensor may not be able to detect the opening, because you see the door frame itself.
2) the detection range is very different. Most sonar detectors can do 6" to about 10-15 ft. The GP2D120 can detect in the 1.5" to 12" range. The GP2D12 can do about 4" to 36". Note especially the lower end of the range - things closer than that appear to be farther away or may not be detected at all.
3) The srf-05 requires you to time the output pulse to determine the distance to the object. The IR sensor outputs a voltage you can convert (with an ADC) to a distance.