REVrobotics / 2m-Distance-Sensor

Port of ST vl53l0x driver for roboRIO to operate the REV Robotics 2m Distance Sensor.
http://www.revrobotics.com/rev-31-1505/
BSD 3-Clause "New" or "Revised" License
6 stars 8 forks source link

Allow to change I2C address of the sensor #5

Closed nathanmutin closed 4 years ago

nathanmutin commented 4 years ago

It would be cool if we could change the I2C address of the sensor so it would be possible to use several of them. There is a function called VL53L0X_SetDeviceAddress that seems to allow to do it.

willtoth commented 4 years ago

I definitely understand the desire to do this especially for cases where you would want multiple of the same device on the bus. The problem is the change does not persist power cycles. So if you had two sensors on the bus, how would you send the 'set address' command to only one of them?

I'm not opposed to adding it, I just am not sure that it has much value since it does not persist.

nathanmutin commented 4 years ago

Ok, I didn't know it. You're right if it does not persist I don't see the case where it would be useful.