I'm trying write code for the VL53L1X on Arduino, but I didn't get the VL53L1X registers. How to access them and how to measure the data in VL53L1X? Can anyone help me?

  • 1
    And the datasheet says what?
    – Majenko
    Commented Apr 7, 2018 at 12:08
  • what model of arduino is the VL53L1X Arduino? ... which manufacturer makes it?
    – jsotola
    Commented Apr 8, 2018 at 2:58

1 Answer 1


He's not asking about a VL53L1X Arduino. He's asking for code to support the VL53L1X (which is an ST distance sensor) that runs on an arduino.

ST have provided a library, but it's huge with many large buffers and doesn't run on an arduino as distributed. They've also forbidden anonymous distribution of a corrected version, presumably because they don't want to make it easy to run on 16-bit processors. It might run easily on a Teensy 3.

Sparkfun have just released a library. It's much smaller but, like the Polulu library for the VL53L0X, it's full of magic numbers where they've stripped the structure out and just write the end result into the registers - so it will be difficult to get the best from the sensors.


There is a good case for writing something halfway : without the overcomplicated code typical of ST's Cube environment but with a bit more content than Sparkfun's version.

It's a boring job unless you have something you need from it. Worthwhile only if you have a good case to support it on AVR. If you try to build the ST sources, look carefully at the maximum write size on I2C (135 bytes) and compile with maximum warnings enable (it will pick up several 16/32 bit wordsize errors, mostly critical).

  • 1
    Majenko, there is no proper data sheet. The programming details are described in the code. Partially.
    – artag
    Commented Apr 15, 2018 at 15:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.