Sensors/ Distance

ESP32 Compatible distance Sensors

Every distance sensor in the catalog, each with wiring, specs and code for the ESP32.

12 sensors Wiring diagrams Code for 5 frameworks

All distance sensors

12 sensors

About distance sensors

Two technologies, different strengths. Ultrasonic sensors like the HC-SR04 are the budget workhorse (roughly 2 to 400 cm) and do not care about target color or sunlight; the JSN-SR04T and A02YYUW put the transducer on a sealed cable, which is why they end up in water tanks and outdoor level gauges.

Laser time-of-flight sensors trade range for precision: the VL53L0X reads in millimeters to roughly 2 m, the VL53L1X stretches to about 4 m, and the VL6180X is for short-range work. The TOF050C, TOF200C and TOF400C are the same ST chips on budget breakouts, named by range. Beams are narrow, so ToF suits small or precise targets; ultrasonic suits broad surfaces like a water level.

At a glance
Sensors12
MostlyI2C (9 of 12)
AlsoDigital · UART
Typical price$1.15 - $15.90