How to use two or more RAK12014? ToF Sensor

I am developing a device where I will need to use four ToF sensors, when I connected the first to sensor A port, it worked perfect, however as soon as I connected the second sensor to sensor B port, I stopped receiving values ​​in the serial. I’m using PlatformIO.

Welcome the forum @vitorschoepping
The ToF sensor RAK12014 is using I2C for communication and every sensor is using the same I2C address. You cannot use more than one I2C device with the same I2C address.

WisBlock has only one I2C bus, so using four ToF sensors is not possible.

Assuming I have two sensors, is it possible to disable or put one of the sensors to sleep and read the value at which it is active?
Thus allowing me to choose the sensor that I will read.

Hi Victor,

I dig a little bit on your question and it seems you can hook multiple VL53L0X.

You have to change the address though. Our example code is based on STM32Duino/VL53L0X and by looking at its source code, you can use this to change the address. I haven’t personally tried though.

Few more useful stuff:
STM32 App note for multipe VL53L0X design
Useful tricks you can find in ST forum like sequences to take

Hi Carlrowan, I managed to make the change in the address, the repositories you indicated helped a lot.

I’m leaving the link to my code for the next people who want to make this address change.
Two sensor code.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.