All Projects → eldruin → embedded-ccs811-rs

eldruin / embedded-ccs811-rs

Licence: Apache-2.0, MIT licenses found Licenses found Apache-2.0 LICENSE-APACHE MIT LICENSE-MIT
Platform agnostic Rust driver for the CCS811 ultra-low power digital gas sensor for monitoring indoor air quality

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to embedded-ccs811-rs

pwm-pca9685-rs
Platform-agnostic Rust driver for the PCA9685 I2C 16-channel, 12-bit PWM/Servo/LED controller
Stars: ✭ 19 (+58.33%)
Mutual labels:  embedded, i2c, driver, embedded-hal, embedded-hal-driver
embedded-sps
Embedded i2c Driver for Sensirion Particulate Matter Sensors - Download the Zip Package from the Release Page
Stars: ✭ 36 (+200%)
Mutual labels:  embedded, i2c, sensor, driver
arduino-sht
Repository for Sensirion humidity and temperature sensor support on Arduino
Stars: ✭ 43 (+258.33%)
Mutual labels:  i2c, sensor, driver
embedded-sht
Embedded SHT Drivers for Sensirion Temperature and Humidity Sensors - Download the Zip Package from the Release Page
Stars: ✭ 53 (+341.67%)
Mutual labels:  i2c, sensor, driver
Drivers
TinyGo drivers for sensors and other devices that use I2C, SPI, GPIO, ADC, and UART interfaces.
Stars: ✭ 250 (+1983.33%)
Mutual labels:  embedded, i2c
Rust I2cdev
Rust library for interfacing with i2c devices under Linux
Stars: ✭ 119 (+891.67%)
Mutual labels:  embedded, i2c
MPU-9250-Sensors-Data-Collect
MPU9250 (MPU6500 + AK8963) I2C Driver in Python for Raspbery PI
Stars: ✭ 51 (+325%)
Mutual labels:  i2c, driver
BME680
Arduino Library to access the Bosch BME680 - temperature, pressure, humidity and gas sensor
Stars: ✭ 30 (+150%)
Mutual labels:  i2c, sensor
Waterius
Передача показаний воды по Wi-Fi. Watermeter Wi-Fi transmitter.
Stars: ✭ 295 (+2358.33%)
Mutual labels:  embedded, i2c
gspca-kinect2
Kinect2 Sensor Device Driver for Linux
Stars: ✭ 25 (+108.33%)
Mutual labels:  sensor, driver
CO2-Ampel
CO2-Ampel / CO2-Traffic-Light to measure and show the carbon dioxide concentration in a room, based on Sensirion SCD30/SCD4x sensor and Microchip SAMD21 microcontroller
Stars: ✭ 20 (+66.67%)
Mutual labels:  sensor, co2
Ehal
Embedded Hardware Abstraction Library
Stars: ✭ 84 (+600%)
Mutual labels:  embedded, sensor
Lv drivers
TFT and touch pad drivers for LVGL embedded GUI library
Stars: ✭ 84 (+600%)
Mutual labels:  embedded, driver
rssd
Rohde & Schwarz SCPI Driver (in Python)
Stars: ✭ 25 (+108.33%)
Mutual labels:  sensor, driver
Embedded Notes
嵌入式linux软件开发、嵌入式linux驱动开发、c语言、单片机开发、IOT开发等面试要点记录
Stars: ✭ 487 (+3958.33%)
Mutual labels:  embedded, driver
canairio sensorlib
Particle sensor manager for multiple sensors: Honeywell, Plantower, Panasonic, Sensirion, etc. This is sensors layer of CanAirIO project too.
Stars: ✭ 24 (+100%)
Mutual labels:  sensor, co2
Adafruit CCS811
Arduino driver for CCS811 digital gas sensor
Stars: ✭ 60 (+400%)
Mutual labels:  sensor, co2
MH-Z-CO2-Sensors
Arduino imeplementation for CO2 sensors of the MH-Z series (Intelligent Infrared CO2 Module)
Stars: ✭ 59 (+391.67%)
Mutual labels:  sensor, co2
esp-idf-hal
embedded-hal implementation for Rust on ESP32 and ESP-IDF
Stars: ✭ 42 (+250%)
Mutual labels:  embedded, embedded-hal
vl53l0x-linux
Library for interfacing with VL53L0X time-of-flight distance sensor under Linux
Stars: ✭ 19 (+58.33%)
Mutual labels:  i2c, sensor

Rust CCS811 Driver: Ultra-low Power Digital Gas Sensor for Monitoring Indoor Air Quality

crates.io Docs Build Status Coverage Status

This is a platform agnostic Rust driver for the CCS811 ultra-low power digital VOC sensor for monitoring indoor air quality (IAQ) using the embedded-hal traits.

This driver allows you to:

  • In application mode:
    • Set the measurement mode. See: set_mode().
    • Check if there is new data ready. See: has_data_ready().
    • Get the algoritm and raw result data. See: data().
    • Get the raw data. See: raw_data().
    • Get the current baseline. See: baseline().
    • Set the baseline. See: set_baseline().
    • Set the environment temperature and relative humidity. See: set_environment().
    • Set the interrupt mode. See: set_interrupt_mode().
    • Set the eCO2 thresholds for interrupts. See: set_eco2_thresholds().
  • In boot mode:
    • Start application. See: start_application().
    • Reset, erase, download and verify new application. See: update_application().
    • Erase application. See: erase_application().
    • Verify application. See: verify_application().
    • Download application. See: download_application().
  • In either mode:
    • Get the firmware mode. See: firmware_mode().
    • Check whether a valid application is loaded. See: has_valid_app().
    • Get the hardware ID. See: hardware_id().
    • Get the hardware version. See: hardware_version().
    • Get the firmware bootloader version. See: firmware_bootloader_version().
    • Get the firmware application version. See: firmware_application_version().
    • Do a software reset. See: software_reset().

Introductory blog post

The device

The CCS811 is an ultra-low power digital gas sensor solution which integrates a metal oxide (MOX) gas sensor to detect a wide range of Volatile Organic Compounds (VOCs) for indoor air quality monitoring with a microcontroller unit (MCU), which includes an Analog-to-Digital converter (ADC), and an I²C interface.

CCS811 is based on ams unique micro-hotplate technology which enables a highly reliable solution for gas sensors, very fast cycle times and a significant reduction in average power consumption.

The integrated MCU manages the sensor driver modes and measurements. The I²C digital interface significantly simplifies the hardware and software design, enabling a faster time to market.

CCS811 supports intelligent algorithms to process raw sensor measurements to output equivalent total VOC (eTVOC) and equivalent CO2 (eCO2) values, where the main cause of VOCs is from humans.

CCS811 supports multiple measurement modes that have been optimized for low-power consumption during an active sensor measurement and idle mode extending battery life in portable applications.

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

extern crate linux_embedded_hal as hal;
use embedded_ccs811::{prelude::*, Ccs811, MeasurementMode, SlaveAddr};
use nb::block;

fn main() {
    let dev = hal::I2cdev::new("/dev/i2c-1").unwrap();
    let nwake = hal::Pin::new(17);
    let delay = hal::Delay {};
    let address = SlaveAddr::default();
    let sensor = Ccs811::new(dev, address, nwake, delay);
    let mut sensor = sensor.start_application().ok().unwrap();
    sensor.set_mode(MeasurementMode::ConstantPower1s).unwrap();
    loop {
        let data = block!(sensor.data()).unwrap();
        println!("eCO2: {}, eTVOC: {}", data.eco2, data.etvoc);
    }
}

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].