Metadata-Version: 2.4
Name: depz-sensor-sdk
Version: 0.1.1
Summary: Python SDK for the DEPZ USB sensor line — HC-SR04 ultrasonic, VL53L8CX/CH 8x8 ToF, BNO086 IMU.
Author: DEPZ
License: MIT
Project-URL: Homepage, https://github.com/depz-ai/depz-sensor-sdk-and-viewer
Project-URL: Repository, https://github.com/depz-ai/depz-sensor-sdk-and-viewer
Keywords: depz,sensor,usb,cdc,vl53l8,bno086,hc-sr04,tof,imu,ultrasonic
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS
Classifier: License :: OSI Approved :: MIT License
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: System :: Hardware :: Hardware Drivers
Classifier: Intended Audience :: Developers
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pyserial>=3.5
Requires-Dist: numpy>=1.24
Dynamic: license-file

# depz-sensor-sdk

Python SDK for the **DEPZ USB sensor line** — four USB CDC-ACM sensors that
speak one shared framed protocol:

- **HC-SR04** — ultrasonic distance
- **VL53L8CX** — 8×8 multizone Time-of-Flight, the base ToF imager (host runs
  the ST ULD)
- **VL53L8CH** — the VL53L8CX superset, adding Compact-Network-Histogram output
- **BNO086** — 9-axis IMU (host runs the SH-2 stack)

Sync API with a background reader thread: open a device, configure it, consume
a stream of decoded, timestamped results. A TypeScript SDK
([`@depz/sensor-sdk`](https://www.npmjs.com/package/@depz/sensor-sdk)) mirrors
this one byte-for-byte via shared golden test vectors.

## Install

```bash
pip install depz-sensor-sdk
```

Linux: your user needs serial access (group `dialout`); `ModemManager` can
grab CDC-ACM ports — disable it or add a udev rule if opens time out.

## Quick start

```python
from depz_sensor_sdk import open_device
from depz_sensor_sdk.vl53l8 import Vl53l8Cx, RESOLUTION_8X8

dev = open_device()                    # first DEPZ sensor by USB id; raises if none
if isinstance(dev, Vl53l8Cx):
    dev.init(progress=print)           # ~25 s: downloads the sensor firmware
    dev.set_resolution(RESOLUTION_8X8)
    dev.set_ranging_frequency_hz(15)   # must be >= 2 Hz
    dev.start_ranging()
    for frame in dev.frames():
        print(frame.grid())            # 8×8 numpy array of mm
```

`open_device()` finds the device by USB VID/PID; pass a serial (`open_device(serial="...")`),
an index, or an explicit port. `depz-sensor list` shows what's connected.

See `docs/guide.md` for the full guide and `docs/api.md` for the API reference.

## License

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