VL53L5CX 8x8 multizone time-of-flight with ESP32
Supply 3.3 V
Bus I2C
I2C address
0x29
Measures distance
Pins and ESP32 wiring
| Pin | Role | ESP32 pin | Notes |
|---|---|---|---|
| INT | Interrupt | D35 | Data ready, optional. SATEL-style order; other boards differ |
| I2C_RST | Not wired to the ESP32 | — | I2C reset, active HIGH. Tie to GND |
| SDA | I2C data (SDA) | D21 | |
| SCL | I2C clock (SCL) | D22 | |
| LPN | Input (the ESP32 drives it) | D25 | Low-power enable: HIGH to talk over I2C. Can be tied to IOVDD |
| PWREN | Not wired to the ESP32 | — | Enables the on-board regulator. Tie to IOVDD |
| AVDD | Power | 3V3 | Use 3V3 |
| IOVDD | Power | 3V3 | Use 3V3 |
| GND | Ground | GND |
Suggested wiring for the 30-pin ESP32 DevKit, avoiding flash, input-only and strapping pins. BoardPilot checks it for you as you wire.
Starter code (Arduino)
#include <Wire.h>
void setup() {
Serial.begin(115200);
Wire.begin(21, 22); // SDA = GPIO 21, SCL = GPIO 22
Wire.beginTransmission(0x29);
bool found = Wire.endTransmission() == 0;
Serial.println(found ? "VL53L5CX 8x8 multizone time-of-flight found at 0x29" : "Not found: check power, GND and SDA/SCL");
}
void loop() {}
Sources
- ST VL53L5CX datasheet, Default I2C address 0x29 (0x52 8-bit); firmware is uploaded by the host at every start (about 86 kB)
- ST UM2884 VL53L5CX ULD guide, LPn must be HIGH to enable I2C communication
Try it in 3D in BoardPilot
Related parts
ADS1015 12-bit ADCADS1115 16-bit ADCADXL375 high-g accelerometer (±200 g)AHT10 temperature + humidityAHT20 + BMP280 combo moduleAHT20 temperature + humidity
Part data: CC BY 4.0, free to reuse with credit to BoardPilot.