Skip to content

Particulate Matter Sensor

The ParticulateMatter sensor class provides access to a particulate matter sensor.

Creates a new ParticulateMatter object instance.

ParticulateMatter(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 particulate matter concentration data.

sample()

An object with the following property:

particulateMatter - A number that represents the sampled particulate matter levels in micrograms per cubic meter.

const sensor = new device.sensor.ParticulateMatter({
sensor: {
io: device.io.I2C,
address: 0x36
}
});
const sample = sensor.sample();
console.log(`PM level: ${sample.particulateMatter} ug/m3`);

Particulate Matter