HCSR04 Ultrasonic Transducer

Shows how to use an HCSR04 module to measure distances.


Ultrasonic_HCSR04 modules usually work with 5v power and TTL levels, so you NEED voltage divider or level shifter for ECHO pin.

Trigger pin is tolerant to 3.3v and should work without problems.


SoC support

  • esp32

  • esp32c2

  • esp32c3

  • esp32s2

  • esp32s3

  • esp8266

  • host

  • rp2040