0.2.0 Aug 1, 2019
0.1.0 Aug 1, 2019

#36 in #humidity-sensor

MPL-2.0 license

25KB
412 lines

Rust Sensor SDC30

A rust driver (and CLI utility) for the sdc30 CO2, Temperature and Humidity sensor.

Status

GitHub tag Travis Build Status Crates.io Docs.rs

Open Issues

Usage

Add the library to your project with cargo add sensor-sdc30 or with sensor-sdc30 = { version = "0.1.0", features = [] } in your Cargo.toml.

Install the utility with one of the following methods:

  • using a precompiled binary from the releases page
  • from source using cargo with cargo install sensor-sdc30

Run sdc30-util to communicate with the sensor.

pi@raspberrypi:~ $ sudo ./sdc30-util --help
sdc30-util 0.1.0
Ryan Kurte <ryankurte@gmail.com>
A Command Line Interface (CLI) for interacting with a local Sdc30 environmental sensor over I2C

USAGE:
    sdc30-util [OPTIONS]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -d, --i2c <i2c>                  Specify the i2c interface to use to connect to the sdc30 device [env: SDC30_I2C=]
                                     [default: /dev/i2c-1]
        --log-level <level>          Enable verbose logging [default: info]
    -p, --sample-period <period>     Specify period for taking measurements [default: 10s]
        --poll-delay <poll_delay>    Delay between sensor poll operations [default: 100ms]

Dependencies

~0.1–1.5MB
~24K SLoC