This is an Arduino library for interaction with the VL53L1X sensor from ST.
This library is built upon the Ultra Lite Driver API (STSW-IMG009) from ST and utilizes the I2C protocol to communicate with the sensor. The manual (UM2510) can be found here or in the extras folder of this repository.
This library is built upon the Ultra Lite Driver. The ultra lite driver is an optimized version of the previously made VL53L1x Full API driver.
There are a few things to look out for, mainly the fast ranging option only works up to 66Hz with the ULD (Ultra Lite Driver) and you can only select from a few timing budget options. However, there is also some gain as the ULD is much smaller in size and integrates the very usefull Dynamic SPAD selection (DSS). In short the DSS tries to make sure your target won't cause under- or overexposure at different distances. See 'Example->02.Advanced->Extendedinformation' to get the amount of SPADs used.
Differences | Full API | Ultra lite |
---|---|---|
API Size | 9kB | 2.3kB |
Number of files | 35 | 4 |
Timing budget | [20-500] | [15,20,33,50,100,200,500] |
Fast ranging 100Hz | Yes | No (66Hz max) |
Dynamic SPAD selection (DSS) | No | Yes |
This library should be compatible with all Arduino-compatible board packages where an I2C bus is available
- Arduino AVR (Uno, Mega, Nano, Pro Mini, Micro etc.)
- Arduino megaAVR boards (Nano every)
- Adafruit SAMD (SAMD21, SAMD51)
- MegaCoreX (ATmega4809, ATmega4808, ATmega3209, ATmega3208, ATmega1609, ATmega1608, ATmega809 and ATmega808)
- megaTinyCore (tinyAVR 0-series, tinyAVR 1-series)
- ESP32. The ESP32 needs around 2k2 - 2k7 resistors on the SDA and SCL pins to VCC to work
The VL53L1X sensor itself is not recommended to handsolder unless you're experienced with LGA packages.
Breakout boards:
If more breakout boards are available please inform me to update the list.
This library is made to work with the Arduino platform and the Arduino IDE.
- In the Arduino IDE, open the 'Sketch' menu and select 'Include Library'm then 'Manage Libraries'
- Search for VL53L1X_ULD
- Select the VL53L1x_ULD entry from the list
- Click 'Install'
Manual installation:
- Download the latest release source code.
- Unzip the compressed file.
- Move the VL53L1X_ULD-VXXX (where VXXX is the Version number) to your libraries folder, which is located in your sketch folder. You can view open your sketch folder location by going to your Arduino IDE and selecting the 'File' menu. After this select the 'Preferences' option and another window will open. In here you can see (and set) your sketchbook location.
- After the manual installation, restart the Arduino IDE to apply the changes.