npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vl53l0x-node

v1.0.2

Published

Basically I took this library: https://github.com/rip3rs/vl53l0x and removed the whole typescript part so it will be easier to work with Node.JS.

Readme

Basically I took this library: https://github.com/rip3rs/vl53l0x and removed the whole typescript part so it will be easier to work with Node.JS.

My main use for this package is with Raspberry Pi 4.

Changes between this library and rip3rs is:

  1. You can use multiple sensors but in a different way.
  2. Added util script to change the VL35L0X sensor address

Install

npm install vl53l0x-node 

Use

Single sensor

const VL53L0X = require('vl53l0x-node');
const vl53 = new VL53L0X(0x29);

async function init () {
    await vl53.init();
    setInterval(async () =>{
        let mes = await vl53.getRangeMillimeters();
        console.log(mes);
    }, 1000)
}

init();

Multiple Sensors

For using multiple sensor you will have to do the following steps:

  1. Connect one of the sensors to the designated SCL and SDA pins on the Raspberry Pi.
  2. Use the addressChange script located in the utils folder in the following way:
node ./node_modules/vl53l0x-node/utils/addressChange.js 0x29 0x2a
  1. Repeat steps 1 and 2 while incrementing the 0x2a (I tested up to 0x30 and the docs suggests that it can go up to 0x3F).
  2. Run example script
const VL53L0X = require('vl53l0x-node');
const vl53_1 = new VL53L0X(0x29);
const vl53_2 = new VL53L0X(0x2a);
const vl53_3 = new VL53L0X(0x2b);

async function init () {
    await vl53_1.init();
    await vl53_2.init();
    await vl53_3.init();
    setInterval(async () =>{
        let mes1 = await vl53_1.getRangeMillimeters();
        let mes2 = await vl53_2.getRangeMillimeters();
        let mes3 = await vl53_3.getRangeMillimeters();
        console.log(mes1, mes2, mes3);
    }, 1000)
}

init();

Known Problems

If you have multiple sensors connected to same i2c bus, one of them may disconnect, when it will reconnect it will get the default address (0x29), I overcome it by putting each sensor on a different i2c bus.

Example Code for this problem:

const VL53L0X = require('vl53l0x-node');
console.log(VL53L0X)

const vl53_1 = new VL53L0X(0x29, 1);
const vl53_2 = new VL53L0X(0x29, 2);
const vl53_3 = new VL53L0X(0x29, 3);

async function init () {
    await vl53_1.init();
    await vl53_2.init();
    await vl53_3.init();
    setInterval(async () =>{
        let mes1 = await vl53_1.getRangeMillimeters();
        let mes2 = await vl53_2.getRangeMillimeters();
        let mes3 = await vl53_3.getRangeMillimeters();
        console.log(`mes1:${mes1},mes2:${mes2}, mes3:${mes3}`)
    }, 1000)
}

init();

You may fork this however you would like and if you want you can also submit and issue and I will try to fix it.