
The HC-SR04 ultrasonic sensor uses sonar to determine distance to an
object like bats do. It offers excellent non-contact range detection
with high accuracy and stable readings in an easy-to-use package.
From 2cm to 400 cm or 1” to 13 feet. Its operation is not affected by sunlight or black material like sharp rangefinders are (although acoustically soft materials like cloth can be difficult to detect). It comes complete with ultrasonic transmitter and receiver module.
Schematic diagram to wire the HC-SR04 ultrasonic sensor to the Arduino UNO R3.