As the title say, I'm trying to get the value from two vl53l0x sensors connected to a Raspberry Pi Zero W.
I wired all well and I tested the sensors one by one. They works well.
The problem is that when they are both connected to the I2C bus, I can't talk to them because they has the same default address 0x29 (checked using the following comand: sudo i2cdetect -y 1)
I read the datasheet of the sensor and searched online for resources to understand how to change the sensor's register value that store the address. There's a specific way to do that as you can see here: AN4846 Application note from page 5.
And than I found this repository that I'm now using to achieve the objective.
But when I run the VL53L0X_multi_example.py I get this output
VL53L0X Start Ranging Address 0x2B
Setting I2C Address to 0x2B
Call of VL53L0X_SetAddress
API Status: -20 : Control Interface Error
VL53L0X Start Ranging Address 0x2D
Setting I2C Address to 0x2D
Call of VL53L0X_SetAddress
API Status: -20 : Control Interface Error
VL53L0X_BETTER_ACCURACY_MODE
Set Accuracy
API Status: -20 : Control Interface Error
VL53L0X_BETTER_ACCURACY_MODE
Set Accuracy
API Status: -20 : Control Interface Error
Timing 20 ms
1 - Error
2 - Error
...
Call of VL53L0X_StopMeasurement
API Status: -20 : Control Interface Error
Call of VL53L0X_StopMeasurement
API Status: -20 : Control Interface Error
I can't understand why this error (API Status: -20 : Control Interface Error), commented as
Error during interrupt clear
in the Api/core/inc/vl53l0x_def.h, is triggered. What is going wrong?