adafruit / Adafruit_VL53L0X

Arduino library for Adafruit VL53L0X
149 stars 118 forks source link

Problem with ESP32 S2 #65

Closed lamerjack closed 1 year ago

lamerjack commented 1 year ago

Running on Generic ESP32 DEV Module this sketch https://github.com/adafruit/Adafruit_VL53L0X/blob/master/examples/vl53l0x/vl53l0x.ino Works fine using pins 21 and 22

On Esp32 S2 where i2c pins are 8 and 9 i get Failed to boot VL53L0X

I run a simple sketch to scan i2c connected and with both boards i get that there is a device connected at address 0x29 so is connected correctly.

lamerjack commented 1 year ago

The library doesn't get automatically the pins so i added

include

Wire.begin(8,9);

and changed if (!lox.begin() { to if (!lox.begin(0x29, false, &Wire)) {