Giter VIP home page Giter VIP logo

vl53l5cx's Introduction

VL53L5CX

Some examples for the ST's VL53L5CX 8 x 8 pixel ranging camera using Simon Levy's Arduino library and Seth Bonn's multi-byte I2C read and write functions.

BasicExample shows how to use the interrupt for data ready as well as allowing some basic parameters to be set like data rate and pixel array size, etc. This sketch combines several of the examples in ST's API. In order to get the 8x8 resolution working I had to increase the VL53L5CX_TEMPORARY_BUFFER_SIZE to 4096 in the vl53l5cx_api.h library file. Simon Levi should have already done this, but if it doesn't work for you check this buffer size and change appropriately.

I am using this VL53L5CX breakout board with the Ladybug STM32L432 development board.

VL53L5CX

DisplayExample is more or less the same as the BasicExample except I have added an Adafruit 128 x 160 color TFT display and I am plotting the 64 ranging pixels using RGB565 format in inverse order; that is, closest pixels are brightest. Unlike plotting 8-bit image data or thermal camera data, the dynamic range of the VL53L5CX is quite large, varying from a few mm to 1650 mm from my desk top to the ceiling, for example. Even when looking at a nearby object the distance gradations are not as "image-y" as I would hope for a "camera". This means nearby objects appear white and far-field objects black and not a lot of gradation in between. Here is an example of the display image of my forefinger ~10 cm above the VL53L5CX:

VL53L5CX_Camera

The forefinger and hand are close and white, ceiling far and black but not much other information is apparent. More work will be required to plot range data in a more intuitive manner. Maybe using a logarithmic scale...

DualExample shows how to use two (or more) VL53L5CX (with default I2C address of 0x29) on the same I2C bus. The sketch uses the LPN pin to disable the I2C bus on one of the VL53L5CX (at 0x29) while the I2C address of the other is changed to 0x27. After the change, both LPN pins are set to HIGH (or the LPN pinMode can be changed to INPUT since there is a 47K pullup on the breakout board). The sensors Dev and Range classes are separately instantiated and data is read upon interrupt for each sensor independently. The treatment is simple and a bit clunky, but effective. This procedure can be repeated for an arbitrary number (well, up to about 100) of VL53L5CX on the same I2C bus.

The VL53L5CX breakout board is available for sale on Tindie.

Copyright 2021 Tlera Corporation. All rights reserved.

vl53l5cx's People

Contributors

kriswiner avatar

Stargazers

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

Watchers

 avatar  avatar

vl53l5cx's Issues

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.