vl53l0x

no_std driver for VL53L0X (Time-of-Flight I2C laser-ranging module)

Build Status

Basic usage

Include this library as a dependency in your Cargo.toml:

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

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

```rust extern crate vl53l0x;

match vl53l0x::VL53L0x::new(i2c, 0x29) { Ok(mut u) => { loop { match u.readrangesinglemillimetersblocking() { Ok(a) => { println!("{:#?}", a); } _ => { println!!("Not ready").unwrap(); } } } } Err(vl53l0x::Error::BusError(error)) => { println!!("{:#?}", error); panic!(); } _ => { panic!(); } }; ```

Documentation

API Docs available on docs.rs

License

MIT license