Maybe an elegant way to address multiple VL53L1X sensors.
Can I use the GPIO1 from the first sensor on the I2C bus to control the XSHUT pin on the second sensor etc.
Here is the plan.
Assume that I do not use the GPIO1 pins to interrupt my microcontroller. I will use the API to check it there is new data.
XSHUT on sensor1 is hardwired High. Sensor1 is in SW_Standby.
On sensor1 GPIO1 is High until a measurement is ready. It is connected thru an inverting transistor to the XSHUT on sensor2 so sensor2 is in HW_standby. All the following sensors should also be in HW_standby also.
Anything wrong yet?
I use the driver to send a command to change the I2C address. Since only the first sensor is in SW_standby only it will accept the new I2C address.
Now for the magic that I need from you folks!
Since GPIO stand for General Purpose Input/Output I'm hoping that there is some way to use it as General Purpose I/O and Set the GPIO on sensor1 low thus switching XSHUT on sensor2 high and putting it in SW_standby mode.
Than I send the change I2C address command to the bespoke I2C address and we are off the the races.
If there is not some command in the driver leftover from what I imagine were the early days when GPIO was still GP that will allow me to control it, is there a tricky way that I can fool it with inturrupt resets or something into doing what I want?
Thanks
G
