2022-04-15 06:04 AM
Hi ST team and community,
I'm here because I have some troubles on the process of initialization of multiple sensors VL53L1.
I use the library of VL53L1.
The process is the following :
Then, in a loop (to setup my 2 sensors) :
Then, switch to another sensor in the loop until initialization of my 2 sensors.
My problem is when the loop arrives on the"VL53L1_SetDeviceAddress" function it gets fail.
Question is, When I try to connect 2 sensor and go for to change address it get fails.
Note: If I remove second sensor and dis-connect XSHUT pin from host of 1st sensor and attach it to pull up by connecting 10k it works and I'm getting data with default address.
2022-04-19 09:56 AM
My guess is that you are too fast. Your MCU is way faster than the sensor. Try lifting the reset pin, then waiting 10ms and the calling the 'are you booted' command. (I forget the name.) When the sensor tells you it's booted you can change the address.
(Or you could just wait 20ms assuming it's booted by then.)