Skip to content

Nitric Dioxide Sensor

The NitricDioxide sensor class provides access to a nitric dioxide sensor.

Creates a new NitricDioxide object instance.

NitricDioxide(options)

options

An object of properties used to construct the class.

sensor - The hardware connection definition.

interval (optional) - The sampling interval in milliseconds.

Returns a sample object containing the current NO2 concentration data.

sample()

An object with the following property:

NO2 - A number that represents the sampled nitric dioxide in parts per million (ppm).

const sensor = new device.sensor.NitricDioxide({
sensor: {
io: device.io.I2C,
address: 0x34
}
});
const sample = sensor.sample();
console.log(`NO2 Level: ${sample.NO2} ppm`);

Nitric Dioxide