A sound wave is sent out. The time it takes to return is used to calculate the distance of the object in front of the sensor.

The project consists of a HR-SR04 which is used to measure the distance of an object in front of it, by sending out a sound wave & measuring the time it takes to come back.

The distance is then calculated and displayed on a 16x2 LCD.