After the MCP3425 ADC driver I published last month as part of the the weekly driver initiative, I wrote a second Rust embedded-hal driver, this time for the SGP30.
The Sensirion SGP30 is a tiny low-power gas sensor (produced in Switzerland) for indoor air quality applications with good long-term stability. It has an I²C interface with TVOC (Total Volatile Organic Compounds) and CO₂ equivalent signals.
For development, I used the Adafruit SGP30 breakout board:
This time I won't explain how to use the driver in this blogpost, because the docs should be quite comprehensive. Check them out!
You can find an example script for Linux on Github.
Thanks for reading, please follow the Weekly Driver Initiative on GitHub :) If you are using this crate and/or have any questions, let me know on Twitter, discuss on Reddit or leave a comment below.
- Sourcecode: https://github.com/dbrgn/sgp30-rs
- Crates.io: https://crates.io/crates/sgp30
- Docs: https://docs.rs/sgp30/