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

API for the Grove O2 Oxygen Gas Sensor. More...

Detailed Description

The Grove O2 Oxygen Gas sensor measures the oxygen concentration in the air

o2.jpg
// The was tested with the O2 Oxygen Concentration Sensor Module
// Instantiate a O2 on analog pin A0
upm::O2 O2(0);
while (shouldRun) {
cout << "The output voltage is: " << O2.voltageValue() << "mV" << endl;
upm_delay_us(100000);
}

Public Member Functions

 O2 (int pin)
 
 ~O2 ()
 
float voltageValue ()
 

Constructor & Destructor Documentation

O2 ( int  pin)

Grove O2 Oxygen Gas sensor constructor

Parameters
pinAnalog pin to use
~O2 ( )

O2 destructor

Member Function Documentation

float voltageValue ( )

Measures O2 from the sensor

Returns
Oxygen concentration as voltage

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