#embedded-hal #no-alloc #no-std #vl53l0x

无std vl53l0x-simple

VL53l0X TOF测距传感器的Rust驱动程序

2个不稳定版本

0.2.0 2024年7月31日
0.1.0 2024年7月15日

610嵌入式开发

Download history 125/week @ 2024-07-14 134/week @ 2024-07-28 3/week @ 2024-08-04

每月262次下载

MIT/Apache

36KB
608

VL53l0X TOF测距传感器的简单Rust驱动程序。

该crate故意保持简单,并未实现VL53l0X的所有功能。它旨在提供从传感器获取距离读数的一种简单方法。如果您想添加更多功能,欢迎提交PR。

该crate的整体架构基于原始的C代码和Pololu Arduino库,但接口已大大简化并Rust化。

使用方法

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

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

依赖项

~56KB