Closed Abhijeetbyte closed 3 years ago
the default i2c address is 0x29 not 0x2B
If the sensor is set for the default address, you don't need to specify. https://github.com/adafruit/Adafruit_VL53L0X/blob/0257f93b933029652b643e422b17861b598549da/src/Adafruit_VL53L0X.h#L50 You only need to pass in an explicit address if it is not the default.
The update example programs (1) vl53l0x (2) vl53l0x_oled were modified because the previous program does not contain the I2C address of the vl53lox sensor as the resulted sensor failed to begin!
I2C only allows one address-per-device, so it is necessary to sure each I2C device has a unique address during initialization; instead of calling lox.begin(), call lox.begin(0x2B).
In (1) example program of vl53l0x sensor, a millimeter to Centimeter function added too, since it's pretty useful some time to deal with bigger units also describe to the user so, they can add their units too.
There are no limitations with changes. The only modification was added to eliminate the failure to boot error (vl53l0x).
Thanks & Regards
Abhijeet Kumar