Hi, I'm trying to change the I2C address of a VL53L0X ToF sensor from the default 0x29 to something else. The problem is, that I have two TCS34725 (with an unchangeable address of 0x29) on my two hardware I2C buses of my ESP32. Due to time constrains, I sadly can't use a I2C multiplexer. To my knowledge, the I2C address for the VL53L0X has to be changed via software every time the powers turned on. But that doesn't really work, and I get this error message:
I think this is because before the address is changed, there are two I2C devices with the same address (0x29) on the same bus. Therefore it can't write the address change for the VL53L0X. Has anyone an Idea on how I could either permanently change the VL53L0X address or some kind of different solution?
Sadly not. The change is only temporary, there is no user writable flash on the Sensor. It gets reset when power cycled. And I can't change it in software because in the beginning, the will be two 0x29, the TCS and the distance Sensor. I guess I will just use a different sensor. Put still thanks for your help
which specific VL53L0X sensor module are you using?
when I used two of the Pololu VL53L0X on power up I used the XSHUT pin of one sensor to disable it while changing the I2C address of the other
this gave me two VL53L0X sensors with different I2C addresses
Yeah, that doesn't work. Maybe I wrote this weirdly, I only use one Distance Sensor and the other sensor with the same Address is a TCS34725 color sensor. And I can't disable it(I think), so this method wouldn't work. But still thanks for the answer
Wow, thanks a lot for both your answers! I will first try the power off idea, and if that won't work, I will try to use software I2C. @kmin I would just connect +3V3 on the Sensor to a GPIO, right?
Hmm, sorry to reopen this topic, but I have a problem. The TCS34725 board has an LED, that is glowing in the beginning, before I set the GPIO Pin to either HIGH or LOW. I'm worried that it draws power over the SDA or SCL Lines. Is this a problem?
Strange, could it draw power from SCL then. I cannot say 100% it's nothing, however I wouldn't worry myself. It's not uncommon that electronics can be "stealing" some power through IO pins. You could do the opposite arrangement, switch off TCS34725 GND instead of Vcc.
Yeah, that could be. But due to time constrains, I will settle for a simple limit switch. Does the job as well and is easier to use. But I will try to solve this after the championship.