upm  1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
Public Member Functions

API for the MICS-VZ89 Gas Sensor. More...

Detailed Description

The MiCS-VZ-86/89 combines state-of-the-art MOS sensor technology with intelligent detection algorithms to monitor VOCs and CO2 equivalent variations in confined spaces.

The MICSV89 comes in 4 variants, PWM and I2C in 3.3 volts and 5 volts. This library only implements the I2c version of the device.

Device output is not valid until a warm up of 15 minutes of operation.

micsv89.jpg
upm::MICSV89 sensor(6);
while (running) {
sensor.update();
while (!sensor.valid())
;
cout << "co2: " << sensor.co2equ() << endl;
cout << "short: " << sensor.vocshort() << endl;
cout << "tvoc: " << sensor.tvoc() << endl;
cout << "resistor: " << sensor.resistor() << endl;
cout << "****************************" << endl;
upm_delay(5);
}

Public Member Functions

 MICSV89 (int bus, uint8_t address=0x70)
 
 ~MICSV89 ()
 
std::string name ()
 
float co2equ ()
 
int vocshort ()
 
float tvoc ()
 
float resistor ()
 
void update ()
 
bool valid ()
 

Constructor & Destructor Documentation

MICSV89 ( int  bus,
uint8_t  address = 0x70 
)

MICSV89 constructor

Parameters
busi2c bus the sensor is attached to.
addressDevice address. Default is 0x70.
~MICSV89 ( )

MICSV89 destructor

Member Function Documentation

std::string name ( )
inline

Returns the name of the sensor

float co2equ ( )

Returns the CO2 equivalent value.

int vocshort ( )

Returns VOC Short value.

float tvoc ( )

Returns Total VOC.

float resistor ( )

Returns resistor value.

void update ( void  )

Performs a write/read cycle.

bool valid ( )
inline

Returns true if a valid write/read cycle has been completed. At startup and during write/read cycle will be false.


The documentation for this class was generated from the following files: