npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

pmsa003i

v1.0.0

Published

A driver for the PMSA003I particle concentration sensor.

Readme

A NodeJS driver for Plantower PMSA003I Digital Particle Concentration Sensor

This library uses the i2c-bus nodeJS package to communicate with the chip over I2C.

Installation

npm install pmsa003i

Usage

const { PMSA003I } = require('pmsa003i');

(async () => {
    const sensor = new PMSA003I();

    while (true) {
        const data = await sensor.read();
        console.log(`PM1.0: ${data.pm1_0_env} ug/m3`);
        console.log(`PM2.5: ${data.pm2_5_env} ug/m3`);
        console.log(`PM10:  ${data.pm10_env} ug/m3`);
        console.log(`Particles >0.3um: ${data.particles_0_3} per 0.1L`);

        await new Promise((r) => setTimeout(r, 1000));
    }
})();

API Reference

Constructor Options

| Option | Default | Description | |--------|---------|-------------| | i2cBusNumber | 1 | I2C bus number | | address | 0x12 | I2C address of the device |

Read Data Fields

| Field | Unit | Description | |-------|------|-------------| | pm1_0_standard | ug/m3 | PM1.0 concentration (CF=1, standard particle) | | pm2_5_standard | ug/m3 | PM2.5 concentration (CF=1, standard particle) | | pm10_standard | ug/m3 | PM10 concentration (CF=1, standard particle) | | pm1_0_env | ug/m3 | PM1.0 concentration (atmospheric environment) | | pm2_5_env | ug/m3 | PM2.5 concentration (atmospheric environment) | | pm10_env | ug/m3 | PM10 concentration (atmospheric environment) | | particles_0_3 | per 0.1L | Particles with diameter beyond 0.3 um | | particles_0_5 | per 0.1L | Particles with diameter beyond 0.5 um | | particles_1_0 | per 0.1L | Particles with diameter beyond 1.0 um | | particles_2_5 | per 0.1L | Particles with diameter beyond 2.5 um | | particles_5_0 | per 0.1L | Particles with diameter beyond 5.0 um | | particles_10 | per 0.1L | Particles with diameter beyond 10 um | | version | - | Sensor firmware version | | errorCode | - | Sensor error code (0 = no error) |

"Standard" concentrations are corrected to standard atmospheric conditions (CF=1, for factory/calibration use). "Environmental" concentrations are measured under current atmospheric conditions and are typically what you want.