The following sketch is a simple example of how you can get the distance between the sensor and an object using the ESP32 board with the Arduino core./*** Rui Santos Complete project details at https://RandomNerdTutorials.com/esp32-hc-sr04-ultrasonic-arduino/ Permission is hereby granted, ...