Skip to content

A simple Rust driver for the vl53l1x TOF ranging sensor.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

NZRosto/vl53l1x-simple

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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);
    }
}

About

A simple Rust driver for the vl53l1x TOF ranging sensor.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages