A component library for MiCS-6814 Multichannel Gas Sensor (seeed)
Dependents: MiCS6814_GasSensor_Hello grove_multichannel_GasSensor
Diff: MiCS6814_GasSensor.h
- Revision:
- 2:8d61377f2e2a
- Parent:
- 1:5caeba593de4
- Child:
- 3:93b7f86b72e1
--- a/MiCS6814_GasSensor.h Wed May 24 13:17:32 2017 +0900 +++ b/MiCS6814_GasSensor.h Wed May 24 13:38:46 2017 +0900 @@ -95,16 +95,16 @@ * Serial pc(USBTX, USBRX); * * #if defined(TARGET_LPC1768) - * MiCS6814_GasSensor sensor(p28, p27); + * MiCS6814_GasSensor _gases(p28, p27); * #else - * MiCS6814_GasSensor sensor(I2C_SDA, I2C_SCL); + * MiCS6814_GasSensor _gases(I2C_SDA, I2C_SCL); * #endif * * int main() { * * while(1) { - * pc.printf("NH3: %.2f ppm, CO: %.2f ppm, NO2: %.2f ppm, C3H8: %.2f ppm \r\n", gas.calcGas(NH3), gas.calcGas(CO), gas.calcGas(NO2), gas.calcGas(C3H8)); - * pc.printf("C4H10: %.2f ppm, CH4: %.2f ppm, H2: %.2f ppm, C2H5OH: %.2f ppm \r\n", gas.calcGas(C4H10), gas.calcGas(CH4), gas.calcGas(H2), gas.calcGas(C2H5OH)); + * pc.printf("NH3: %.2f ppm, CO: %.2f ppm, NO2: %.2f ppm, C3H8: %.2f ppm \r\n", _gases.calcGas(NH3), _gases.calcGas(CO), _gases.calcGas(NO2), _gases.calcGas(C3H8)); + * pc.printf("C4H10: %.2f ppm, CH4: %.2f ppm, H2: %.2f ppm, C2H5OH: %.2f ppm \r\n", _gases.calcGas(C4H10), _gases.calcGas(CH4), _gases.calcGas(H2), _gases.calcGas(C2H5OH)); * wait(1); * } * } @@ -123,8 +123,8 @@ public: /** Create a MiCS6814_GasSensor instance * the sensor is connected to specified I2C pins with specified address - * 1. create an I2C instance - * 2. initialize private variables. + * 1.Create an I2C instance + * 2.Initialize private variables. * * @param[in] sda I2C-bus SDA pin * @param[in] scl I2C-bus SCL pin @@ -134,8 +134,8 @@ /** Create a MiCS6814_GasSensor instance * the sensor is connected to specified I2C pins with specified address - * 1. pass an I2C instance, - * 2. then initialize private variables. + * 1.Pass an I2C instance, + * 2.Initialize private variables. * * @param[in] i2c_obj I2C object (instance) * @param[in] slave_adr (option) I2C-bus address (default: 0x04<<1) @@ -143,15 +143,15 @@ MiCS6814_GasSensor(I2C &i2c_obj, char slave_adr = SLAVE_ADDRESS_MiCS6814); /** Destructor of MiCS6814_GasSensor - * 1. Power off heater - * 2. Release allocated heap memory. + * 1.Power off heater + * 2.Release allocated heap memory. */ virtual ~MiCS6814_GasSensor(); /** Initialize MiCS6814_GasSensor - * 1. Read firmware version from sensor - * 2. Power on heater - * 3. Clear private variables + * 1.Read firmware version from sensor + * 2.Power on heater + * 3.Clear private variables */ void initialize(void);