CO2 Sensor SCD30 for Rust

This is yet another implementation of a Sensirion SCD30 i2c sensor driver in pure rust. The sensor measures CO2, temperature and humidity.

The sensor documentation can be obtained directly from Sensirion: https://www.sensirion.com/fileadmin/userupload/customers/sensirion/Dokumente/9.5CO2/SensirionCO2SensorsSCD30Interface_Description.pdf

Please take in account that this is my first project in Rust since reading the book so it might not be as rusty as it should be as my Java and C++ background influenced my code non negligible.

The target platform is a Raspberry pi so either you compile it on an rpi or use crosscompiling. It is based on Raspberry Pi Peripheral Access Library (https://crates.io/crates/rppal). The physical SCD30 connection to i2c can be done by wiring the device to the first i2c ports of the GPIO connector.

Connect to RaspberryPi GPIO: - pin 1 (3.3V/VCC) - pin 3 (SDA) - pin 5 (SCL) - pin 6 (GND).

Cross Compile

Copile using:

cargo build --target=armv7-unknown-linux-gnueabihf --release

Additional resources about cross compiling can be found at https://github.com/japaric/rust-cross