We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Using the VL53L0X Range Sensor with Omega (proprietary i2c protocol)?



  • Hi all,

    I recently picked up a VL53L0X "Time of Flight Range Sensor" (Adafruit, datasheets) to use with my OmegaBot and other projects, ideally with Python.

    It was only $15, but I was still dismayed to learn that, while it uses i2c, the registers aren't public and they have a proprietary protocol to talk to it. It does work though, it shows up in i2cdetect. There are precompiled libraries for Raspberry Pi etc, which obviously won't work on the Omega as-is. (I did try, there's a couple in the openwrt Python package library but they just crash on install)

    So I'm wondering what the shortest path would be to get this running? There's a few readily available C libraries that would have to be re-compiled as a python module, but I have no idea how difficult that is for the Omega.

    Adafruit library: https://github.com/adafruit/Adafruit_VL53L0X
    Pimoroni python library: https://github.com/pimoroni/VL53L0X-python
    Python library for Raspberry Pi: https://github.com/johnbryanmoore/VL53L0X_rasp_python

    etc, etc.

    Any advice?



  • @Leif-Bloomquist said in Using the VL53L0X Range Sensor with Omega (proprietary i2c protocol)?:

    It was only $15, but I was still dismayed to learn that, while it uses i2c, the registers aren't public and they have a proprietary protocol to talk to it. It does work though, it shows up in i2cdetect.

    According to the datasheet VL53L0X is an absolutely normal I2C device. You can use the usual I2C protocol for device control and data transfer.
    The default device (slave) address is 0x29, it has 8 bit register address (index in ST terminology) and the registers contain 8,16 or 32-bit data.

    I don't have such device. Try these commands and let us know their outputs please.
    i2cdetect -y 0 --> 0x29
    i2cget -y 0 0x29 0x8a --> 0x29
    i2cget -y 0 0x29 0xc0 --> 0xee
    i2cget -y 0 0x29 0xc1 --> 0xaa
    i2cget -y 0 0x29 0xc2 --> 0x10



  • Yes, those work perfectly and are used to determine the device is there.

    But there is no way to read the actual range data without a lot of i2c back-and-forth with their custom protocol.

    There are python libraries to handle this, but none of them work on the Omega (yet)



Looks like your connection to Community was lost, please wait while we try to reconnect.