I wanted to save a pin by not using the shutdown pin. And I noticed every time I uploaded the code the MCU was unable to communicate with the VL53L1X. And I needed to power cycle to make it work.
After some investigation, I realized the address of the device is changed inside Adafruit_VL53L1X::begin (line 64):
vl_status = InitSensor(i2c_addr * 2);
So if I don't use the shutdown pin, but reset the MCU, the MCU tries to find VL53L1X using the default address, but resetting MCU doesn't reset the VL53L1X, so it has the new address.
I wanted to save a pin by not using the shutdown pin. And I noticed every time I uploaded the code the MCU was unable to communicate with the VL53L1X. And I needed to power cycle to make it work.
After some investigation, I realized the address of the device is changed inside
Adafruit_VL53L1X::begin
(line 64):vl_status = InitSensor(i2c_addr * 2);
So if I don't use the shutdown pin, but reset the MCU, the MCU tries to find VL53L1X using the default address, but resetting MCU doesn't reset the VL53L1X, so it has the new address.
Why was the device address changed by default?