Thank you for your useful article on more advanced Arduino programming, at http://www.pragprog.com/magazines/2011-04/advanced-arduino-hacking
I just wanted to make a correction in one detail. The article says, “…For our PDC I’ve chosen the SHARP GP2Y0A21YK0F infrared proximity sensor, because it’s much cheaper than most ultrasonic sensors. The sensor emits infrared light and measures the time it takes for the reflected light to get back to the sensor”
but in fact, that sensor uses triangulation (imaging the reflected IR spot onto a position-sensitive detector; which is a simple one-dimensional sensor array).
You can do time-of-flight measurement for distance, but it is expensive due to the high-speed modulated laser and fast detector required.