Giter Club home page Giter Club logo

sds011-wrapper's Introduction

SDS011-Wrapper

Output

Build Status Codecov

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.

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 SDS011Wrapper = require("sds011-wrapper");
  1. Connect to your sensor through serial port
const sensor = new SDS011Wrapper("COM5");
  1. Configure
await sensor.setReportingMode('active');
await sensor.setWorkingPeriod(10);
// everything's set
  1. Do awesome things
sensor.on('measure', (data) => {
    if (data['PM2.5'] > 10) {
        powerAirPurifierOn();
    } else {
        powerAirPurifierOff();
    }
});

Installation

npm install sds011-wrapper

Usage

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

sds011-wrapper's People

Contributors

alkarex avatar dependabot[bot] avatar mihaerzen avatar triforcely avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.