VL53L1X on I2C Ports 0 and 1 of Teensy LC

Hello!

I’m using two VL53LX1 sensors, each one conected to a different I2C port of TeensyLC, namely I2C(0) and I2C(1). So I have changed the Wire library for another one called i2c_t3. The later only runs on ARM, not AVR. I’m using the Arduino version of your library and Arduino IDE 1.8.9.

I have opened an issue on Github (Github - issue #6)

I’m asking for advice about the right manner of implementing this change. As far as I can tell, in other topics in this forum people is trying to run multiple sensors on the same bus, and I understand that using the XSHUT pin I can do that, so this is not my case.

Thank you in advance for your help.

Hi, Gatodillo.

From a quick look, that looks like it should work fine as a method to let you choose the I2C port to use on a Teensy. Does it work as expected, or is there some particular issue that you are concerned with?

Kevin

Hi Kevin!

I don’t want to reinvent the wheel but I have forked Pololu’s library for VL53LX1 to implement the commented changes. Maybe someone will find it useful or will come with a better solution.

Thanks for your review, greetings!