Giter VIP home page Giter VIP logo

iaq-core-rs's Introduction

Rust iAQ-Core Indoor Air Quality Sensor Driver

crates.io Docs Build Status Coverage Status

This is a platform agnostic Rust driver for the iAQ-Core indoor air quality sensors using the embedded-hal traits.

This driver allows you to:

  • Read all the sensor data at once. See: data().
  • Read the CO2 equivalent prediction value in ppm. See: co2().
  • Read the TVOC equivalent prediction value in ppb. See: tvoc().
  • Read the sensor resistance in Ohm. See: resistance().

The ams iAQ-core Indoor Air Quality Module is a low-cost, ultracompact solution for detecting poor air quality. It is equipped with an MOS sensor element for the detection of a broad range of reducing gases such as CO and VOCs. A change of resistance in the presence of these gases generates a signal that is translated into parts per million (ppm) CO2 equivalent or parts per billion (ppb) TVOC equivalent units.

When defined threshold limits are exceeded, the module signals the system to initiate activities such as increasing ventilation, releasing fragrance, providing a message to open a window, switching on an air cleaner, etc. When VOC levels are minimized, the module instructs the system to return to standby, thereby saving energy, lowering operating costs and maintaining a healthy environment.

In any demand-controlled ventilation/actuation environment where air quality is important, including commercial and residential facilities (offices, classrooms, kitchens, bathrooms, living and bedrooms etc.) the iAQ-core Indoor Air Quality Module performs accurately and reliably. Plus, the module’s small size opens up a wide variety of new applications where space is at a premium.

Documentation:

Usage

To use this driver, import this crate and an embedded_hal implementation, then instantiate the device.

Please find additional examples using hardware in this repository: driver-examples

use iaq_core::IaqCore;
use linux_embedded_hal::I2cdev;
use nb::block;

fn main() {
    let dev = I2cdev::new("/dev/i2c-1").unwrap();
    let mut sensor = IaqCore::new(dev);
    loop {
        let data = block!(sensor.data()).unwrap();
        println!("CO2: {} ppm, TVOC: {} ppb", data.co2, data.tvoc);
    }
}

Support

For questions, issues, feature requests, and other changes, please file an issue in the github project.

License

Licensed under either of

at your option.

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

iaq-core-rs's People

Contributors

eldruin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.