#vl53l1x #embedded-hal

no-std vl53l1x-simple

A Rust driver for the VL53l1X TOF ranging sensor

2 unstable releases

0.2.0 Jul 31, 2024
0.1.1 Jul 15, 2024
0.1.0 Jul 15, 2024

#366 in Embedded development

Download history 206/week @ 2024-07-12 19/week @ 2024-07-19 136/week @ 2024-07-26 16/week @ 2024-08-02 19/week @ 2024-09-13 15/week @ 2024-09-20 18/week @ 2024-09-27 6/week @ 2024-10-04

58 downloads per month

MIT/Apache

41KB
664 lines

A simple Rust driver for the VL53l1X TOF ranging sensor.

This crate is intentionally basic and does not implement all the features of the VL53l1X. It is designed to be a simple way to get distance readings from the sensor. PRs are welcome if you would like to add more features.

The overall architecture of this crate is based on the original C code and the Polulu Arduino library, but the interface has been greatly simplified and Rust-ified.

Usage

let mut tof = Vl53l1x::new(i2c, x_shut, 0x30, &clock_source).unwrap();

loop {
    if let Some(reading) = tof.try_read().unwrap() {
        println!("Distance: {}mm", reading);
    }
}

Dependencies

~56KB