Skip to content

ivkos/sds011-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDS011 Client for Node.js

Build Status Codecov

Air quality measurements made easy with client library for SDS011 UART interface.

Save your time and focus on specific IoT solution instead of serial communication.

NPM

Watch out!

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.

Synopsis

  1. Require the module
const SDS011Client = require("sds011-client");
  1. Connect to your sensor through serial port
const sensor = new SDS011Client("COM5");
  1. Configure
Promise
    .all([sensor.setReportingMode('active'), sensor.setWorkingPeriod(10)])
    .then(() => {
        // everything's set
    });
  1. Do awesome things
sensor.on('reading', r => {
    if (r.pm2p5 > 10) {
        powerAirPurifierOn();
    } else {
        powerAirPurifierOff();
    }
});

Installation

npm install sds011-client

Usage

  • Check the 'examples' folder.
  • See the API docs

Contributors

This project is based on the original work by Michał Wilski - SDS011-Wrapper.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published