Hi
for a project in school i have to implement 5-7 VL53L1X sensors. I found a code for VL53L0X sensors.
I tried to implement two sensors with this code:
when i run the code
i got two different address but i canāt decide which sensor get which address.
sensor get the address 0x16 and
sensor2 get the addres 0x29(default address)
and when my programm is in the loop
i get āTIMEOUTā, so something with the timeout from the sensors is wrong
can somebody help me, why i have different address then i write in my code??
From your code, it looks like you intend to connect pins 4 and 5 to the XSHUT pin on the two sensor boards and I do not see any obvious problems with the code. Can you post pictures here that show your connections between the sensors and the microcontroller board including any soldered connections you made? Have you tried a simpler code that tries to initialize and read one of the two sensors without changing the address?
When i tried it with one sensor i can change the address. But when I initialized it again I get an error because he doesnāt have the default address. So i have to shutdown the sensor to start it again. I will upload a picture tomorrow.
The thing is, I donāt need the VL534L1X sensors from Pololu. I ordered them from STMicroelectronics. So they are slightly diffrent from your sensors. But I ordered some sensors from pololu. I also have a problem with the level-shifter. I hope I donāt have the same problem with your sensors. Do you have a datasheet with all the registers for the VL53L1X?
Our init() routine resets the sensor so it will also reset the address. You should run that before changing the address and not after.
As far as we know, ST does not provide a datasheet that documents the VL53L1X sensorās registers, but it is possible to infer some information about them from the way the API accesses the sensor.