fs3000

Crates.iofs3000
lib.rsfs3000
version0.1.0
sourcesrc
created_at2023-02-22 15:36:07.844254
updated_at2023-02-22 15:36:07.844254
descriptionBasic embedded-hal-based I2C driver for the FS3000-1005 and FS3000-1015 air velocity sensors
homepage
repositoryhttps://github.com/besselfunct/fs3000
max_upload_size
id791901
size6,642
(besselfunct)

documentation

README

fs3000

Basic I2C driver for the Renesas FS3000-1005 and FS3000-1015 Air Velocity Sensors

! This crate is a WIP. Reading of sensors is supported, but the checksum is not calculated for the resulting data !

Currently the following features are implemented:

  • Reading bytes from the sensor
  • Converting bytes to counts
  • Calculating the checksum
  • Converting counts to m/s via interpolation

TODO:

  • Add checksum calculation to get_measurement function
  • Add custom error type and error handling if checksum calculation fails

Example use:

use fs3000::*;

// Change ChipType based on the range of the sensor you're using
let mut sensor = FS3000::new(i2c, DeviceAddr::Default, ChipType::Type1005)?;

loop {
  let measurement = sensor.get_measurement();
  println!("Air Velocity is: {:?} m/s", measurement);
  // Add some delay function here.
  // The response time of the sensor is 125 ms
}
Commit count: 12

cargo fmt