NXT EOPDGus Jansson of HiTechnic has written a nice article on how to use the HiTechnic EOPD sensor as a distance measuring sensor. 

Ever wanted to know why the response of the EOPD is not linear? Gus does a great job of explaining it and how to calibrate your EOPD to give you maximum accuracy.

Go check it out: [LINK].