blog.dbrgn.ch

Weekly Driver: Using the SGP30 Gas Sensor from Rust

written on Sunday, April 01, 2018 by

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 Device

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:

The SGP30 breakout board by Adafruit

The Driver

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.

SGP30 example program

That's it!

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.

Links:

This entry was tagged driver, embedded, embedded-hal, rust and sgp30