The HC-SR04 measures distance using ultrasonic sound waves. It emits a 40kHz burst, listens for the echo, and the round-trip time is used to calculate distance. Commonly used in robotics for obstacle avoidance and object detection projects.
| Pin | Name | Function | Type |
|---|---|---|---|
| 1 | VCC | Power supply, 5V | PWR |
| 2 | TRIG | Trigger input, send 10us pulse to start | I/O |
| 3 | ECHO | Echo output, pulse width equals distance | I/O |
| 4 | GND | Ground | GND |