cap:pm10
- read PM10 density (air quality)¶
This capability is used to mark sensors that monitor particulate matter (PM) between 2.5 and 10 micrometers (μm).
if(thing.matches('cap:pm10')) {
console.log('PM10:', await thing.pm10());
}
API¶
Events¶
Protected methods¶
Implementing capability¶
Implementors of this capability should call updatePM10
whenever the
detected PM10 changes.
const { Sensor, PM10 } = require('abstract-things/sensors');
class Example extends Sensor.with(PM10) {
constructor() {
super();
this.updatePM10(5);
}
}