Air quality measurements made easy with wrapper library for SDS011 UART interface.
Save your time and focus on specific IoT solution instead of serial communication.
Nova Fitness SDS011 laser is designed for 8000 hours of continuous use - this is less than one year. It is recommended to configure working period to extend life span of your solution.
- Require the module
const SDS011Wrapper = require("sds011-wrapper");
- Connect to your sensor through serial port
const sensor = new SDS011Wrapper("COM5");
- Configure
await sensor.setReportingMode('active');
await sensor.setWorkingPeriod(10);
// everything's set
- Do awesome things
sensor.on('measure', (data) => {
if (data['PM2.5'] > 10) {
powerAirPurifierOn();
} else {
powerAirPurifierOff();
}
});
npm install sds011-wrapper
- Check the 'examples' folder.
- See the API docs