Anyone get a VL53L1X to work with ESP32?

mitchellclaxton
Posts: 5
Joined: Tue Jan 29, 2019 12:36 am

Anyone get a VL53L1X to work with ESP32?

Postby mitchellclaxton » Fri Mar 22, 2019 7:49 pm

I'm trying to get multiple Time-of-Flight sensors working with my board (ESP32-WROVER-KIT)

I managed to get the Adafruit VL6180X working using the Adafruit_VL6180X.h library, even though i can't change the slave address.

The long range VL53L1X however, using the arduino library VL53L1X.h (but with Wire initiated on pins i selected) yields me no results, it just freezes my program. I followed the example codes from them. The code works with an Arduino Uno so I guess there is some sort of compatibility issue with the ESP32 but i don't see anything in the library itself that tells me that

Has anyone found a solution for this? A different library?

this is the library I'm using https://github.com/pololu/vl53l1x-ardui ... /VL53L1X.h

mitchellclaxton
Posts: 5
Joined: Tue Jan 29, 2019 12:36 am

Re: Anyone get a VL53L1X to work with ESP32?

Postby mitchellclaxton » Fri Mar 22, 2019 8:52 pm

UPDATE 2:

init returns false. I think it's continuously timing out



Update 1:

Here's the general code:

it stops working after using setDistanceMode

Code: Select all

longFront.setTimeout(500);
  longFront.init();
  longFront.setAddress(0x52);
  //longFront.setDistanceMode(VL53L1X::Long); //not working somehow
  //longFront.setMeasurementTimingBudget(30000);
  longFront.startContinuous(50);
 

Who is online

Users browsing this forum: No registered users and 76 guests