Giter Site home page Giter Site logo

rneurink / vl53l1x_uld Goto Github PK

View Code? Open in Web Editor NEW
14.0 4.0 6.0 1.7 MB

Arduino library for the VL53L1X ported from the Ultra Lite Driver from ST

License: BSD 3-Clause "New" or "Revised" License

C 39.35% C++ 60.65%
vl53l1x arduino-library stmicroelectronics sensor tof

vl53l1x_uld's Introduction

VL53L1X_ULD

Arduino LintCompile Examples

Summary

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.

Ultra lite driver VS Full API

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

Supported platforms

This library should be compatible with all Arduino-compatible board packages where an I2C bus is available

Tested boards/platorms:

  • 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

Getting started

Hardware

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.

Software

This library is made to work with the Arduino platform and the Arduino IDE.

  1. In the Arduino IDE, open the 'Sketch' menu and select 'Include Library'm then 'Manage Libraries'
  2. Search for VL53L1X_ULD
  3. Select the VL53L1x_ULD entry from the list
  4. Click 'Install'

Manual installation:

  1. Download the latest release source code.
  2. Unzip the compressed file.
  3. 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.
  4. After the manual installation, restart the Arduino IDE to apply the changes.

vl53l1x_uld's People

Contributors

rneurink avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vl53l1x_uld's Issues

ReadDistanceHardwareInterrupt() not working

I use ESP32 on platform I/O, all other functions in this library works fine. I connectted VL53L1X's GPIO 1 to the GPIO 4 of ESP 32, with a 22 ohm resistor. I also connectted each of the SCL and SDA a 22k resistor to the Vcc.

WIth I run the ReadDistanceHardwareInterrupt(), no error is happening, but no response too. The GPIO 1 of VL53L1X is always high, regardless of the setting of sensor.SetInterruptPolarity(ActiveLOW) or sensor.SetInterruptPolarity(ActiveHIGH. Seems here has a problem? so the input pin 4 of ESP32 canot receive interrupt signal.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.