A lightweight, header-only Arduino library for ST Microelectronics VL53L5 multizone Time-of-Flight ranging camera (get it here!) This library is designed to simplify the use of the sensor by helping you avoid illegal configurations; e.g., specifying an integration constant in continuous mode, or specifying too high a sampling frequency at a given resolution.
-
Connect I2C in the usual way (SCL, SDA, 3.3V, GND)
-
Connect INT and LPN to digital pins on your board, making sure the pin numbers agree with the pin numbers specified in the Basic test sketch.
-
Flash the Basic test sketch onto your board.
-
After a few seconds you should see the LED turn on solid.
-
A few seconds after that, the LED should start blinking.
-
Open the serial monitor to observer the rangefinder readings.
I have tested this library on the following platforms:
Compiling on ESP32 with warnings set to More or All, you may get a memory warning that is treated as an error. Although ST claims to have fixed this problem, I was unable to get their code working on my ESP32. So I have opted to include the older code and set warnings to Default.