VL53L1X: multiple sensors

Hello,

I use your library for the VL53L1X on Arduino. With one sensor it work perfectly.

Then I try to use two sensor on one Arduino and it fails.

First way : I try to set a diffrent adresse for the seconde sensor but when I put the power down the adresse is reset.

Seconde way : - change de first address with only one sensor active (after init of the first sensor)

  • Delay 10sec

  • put the power on on the seconde sensor.

  • end of the delay

  • init of the second sensor (with the default address)

  • try to read the two sensor and it don’t work

I have made a function for changing the address for the read of the sensor without changing it on the sensor memory.

I’m not sure I’m doing it the right way.

If you have any advice for me or an exemple code for using two sensor in the same time, it will be great.

Thanks a lot

You can’t change the address permanently in memory. It resets to the default on power up. I would recommend using the [Qwiic Mux, it will be the easiest. You can check out this guide for a little bit of information on that: https://learn.sparkfun.com/tutorials/ge … ware-tests](SparkFun Qwiic Mux Breakout - 8 Channel (TCA9548A) - BOB-16784 - SparkFun Electronics)