SGP30 constructor

SGP30(
  1. I2C i2c, [
  2. bool init = true
])

Creates a SGP30 sensor instance that uses the i2c bus.

Implementation

SGP30(this.i2c, [bool init = true]) {
  if (init) {
    iaqInit();
    measureIaq();
    _isInitialized = true;
  }
}