MOVED: How to calculate distance using arduino

This topic has been moved to Programming Questions. Inappropriate section http://arduino.cc/forum/index.php?topic=158148.0