Giter Club home page Giter Club logo

vl53lx-pi's Introduction

VL53L3CX Raspberry Pi C Library

Screenshots

C program: Wiring diagram Python subscriber: Wiring diagram

Wiring

Wiring diagram

Build from source

You can build the application from source using the following steps:

  1. Install ZeroMQ dependency

     sudo apt install libczmq-dev
    
  2. Clone the repo and build

     git clone https://github.com/74ls04/vl53lx-pi.git
     cd vl53lx-pi
     make vl53lx-pi
    
  3. Then you can run it using:

     ./bin/vl53lx-pi
    

To publish the data over the network on default port 5556 using histogram B data only, use the command:

    ./bin/vl53lx_pi --histogram=B

Configure and start

To start the application, you can use the vl53lx_pi executable. There are several things you can configure:

    Usage: ./bin/vl53lx_pi [OPTION]...
    Options:
    -g, --histogram=NAME                  Show histogram data. A, B, or AB.
    -c, --compact                         Enable compact mode.
    -q, --quiet                           Disable debug messages.
    -d, --distance-mode=MODE              Set distance mode. SHORT, MEDIUM, or LONG.
    -p, --port=NUMBER                     Set the port number for publishing data. Default 5556.
    -m, --poll-period=MILLISECONDS        Set device polling period in (ms). (Default=33).
    -t, --timing-budget=MILLISECONDS      Set VL53L3CX timing budget (8ms to 500ms). (Default=33).
    -x, --xshut-pin=NUMBER                Set GPIO pin for XSHUT (Default=4).
    -a, --address=ADDRESS                 Set VL53L3CX I2C address.
    -h, --help                            Print this help message.

Install or update [NOT COMPLETE]

To install, download the latest release from the releases page

    wget http://RELEASE_NAME_URL.tar.gz

Extract the application to the install directory:

    rm -rf /usr/local/vl53lx-pi && tar -C /usr/local -xzf RELEASE_NAME.tar.gz

Then add the application to the PATH environment variable:

    echo 'export PATH=$PATH:/usr/local/vl53lx-pi'  >> $HOME/.profile

You can make the changes immediately available by running:

    source $HOME/.profile

Verify installation by running:

    $ vl53lx-pi --help

Uninstall

To uninstall, run the command using sudo:

    rm -rf /usr/local/vl53lx-pi

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.