Part 1: Hardware

Introduction to Sonar Measurement

The HC-SR04 ultrasonic sensor uses sound waves to determine the distance to an object. It operates on a principle similar to sonar used by bats and ships: emitting a sound pulse and measuring the time it takes for the echo to return. This method provides a way to measure distance without physical contact, which can be useful for applications like obstacle detection or level measurement.​