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

@depz/sensor-sdk

v0.1.2

Published

TypeScript SDK for the DEPZ USB sensor line (SR04, VL53L8CX/CH, BNO086) — WebSerial + Node

Readme

@depz/sensor-sdk

TypeScript SDK for the DEPZ USB sensor line — four sensor classes across three USB CDC-ACM device families that speak one shared framed protocol, usable from the browser (WebSerial) and Node (serialport):

  • HC-SR04 — ultrasonic distance
  • VL53L8CX / VL53L8CH — 8×8 multizone Time-of-Flight (host runs the ST ULD); Vl53l8Ch is the Vl53l8Cx superset, adding Compact-Network-Histogram output
  • BNO086 — 9-axis IMU (host runs the SH-2 stack)

Pure ESM, zero runtime dependencies on the browser path (serialport is an optional peer used only by the ./node entry). Mirrors the Python depz-sensor-sdk byte-for-byte via shared golden test vectors.

Install

npm install @depz/sensor-sdk
# for Node serial access also:
npm install serialport

Quick start (browser, WebSerial)

import { openDevice } from "@depz/sensor-sdk/web";

const port = await navigator.serial.requestPort(); // user gesture
const dev = await openDevice(port);
// dev is the correctly-typed sensor class (Sr04 | Vl53l8Cx/Ch | Bno086)

Quick start (Node)

import { openDevice, listDepzDevices } from "@depz/sensor-sdk/node";

const dev = await openDevice();          // default: the DEPZ device with the smallest serial

Selecting a device (contract 02 §4.3)

Selection is by USB identity: only ports with a known DEPZ (vid,pid) are considered, ordered by serial — the same rules across Node and browser (in the browser the serial comes from a GET_SERIAL probe of granted ports).

await openDevice();                         // default — smallest serial
await openDevice(0);                        // by INDEX — Nth candidate, sorted by serial
await openDevice(1);                        // second SR04 when two are plugged in
await openDevice(undefined, { serial: "UMPVOB2461" }); // by exact USB SERIAL
await openDevice("/dev/ttyACM0");           // explicit port path (Node)

for (const info of await listDepzDevices()) // enumerate candidates first
  console.log(info.path, info.sensorType, info.serialNumber);

No DEPZ candidate → throws (never falls back to the first system port), matching the Python open_device() semantics.

Entry points: @depz/sensor-sdk (core, transport-agnostic), @depz/sensor-sdk/web (WebSerial), @depz/sensor-sdk/node (serialport). See docs/ for the per-sensor guides and the generated API reference.

License

MIT. Bundled VL53L8 sensor-firmware blobs are © STMicroelectronics (BSD-3-Clause).