HC-SR04 is an ultrasonic distance sensor commonly used in electronics projects for measuring distances. It works by emitting ultrasonic sound waves and measuring the time it takes for the echo to return after bouncing off an object.
VCC – Power supply (5V)
GND – Ground
Trigger (TRIG) – Input signal (to start measurement)
Echo (ECHO) – Output signal (returns the time taken for the sound wave to bounce back)
Application
Obstacle avoidance in robots
Distance measurement in automation systems
Water level monitoring
Parking assist systems