#embedded-hal-driver #distance #range #time-fo-flight

no-std vl53l0x

A platform agnostic driver to interface with the vl53l0x (time-to-flight sensor)

7 releases (2 stable)

1.0.1 Jul 24, 2024
1.0.0 May 23, 2024
0.4.0 May 23, 2024
0.3.1 Jan 29, 2020
0.1.5 Nov 14, 2018

#135 in Embedded development

Download history 137/week @ 2024-07-22 73/week @ 2024-07-29 9/week @ 2024-09-16 26/week @ 2024-09-23 19/week @ 2024-09-30

613 downloads per month

MIT license

36KB
689 lines

vl53l0x

no_std driver for the vl53l0x vl53l0x (Time of Flight IR distance sensor).

Build Status

What works

  • To be tested

Supported chips

  • VL53L0X;

Basic usage

Include library as a dependency in your Cargo.toml :

[dependencies.vl53l0x]
version = "<version>"

Use embedded-hal implementation to get I2C handle and delay then create vl53l0x handle:

use vl53l0x;

// to create sensor with i2c:

let mut tof = vl53l0x::VL53L0x::new(i2c).expect("tof");
tof.set_measurement_timing_budget(200000).expect("time budget");
tof.start_continuous(0).expect("start");
let mls = tof.read_range_continuous_millimeters();
println!("{}", mls);

More examples

STM32

Number of examples can be found in proving-ground repo.

ESP32-C3

https://github.com/ChocolateLoverRaj/rust-esp32c3-examples/tree/main/VL53L0X

Documentation

API Docs available on docs.rs.

License

Licensed under either of

at your option.

Dependencies

~68KB