pms7003
v0.7.5
Published
pms7003 Driver
Downloads
25
Maintainers
Readme
PMS7003 Particulate matter Senser
- plantower Particulate matter Senser
- plantower 미세먼지 측정 센서
install
npm install pms7003
PMS7003 Senser Driver Usage
package import
import { SerialPort } from "serialport";
import { PMS7003 } from "pms7003.js";
or
const { SerialPort } = require("serialport");
const { PMS7003 } = require("pms7003")
Connect Usage
try {
const portName = "/dev/ttyAMA0";
const serialPort = new SerialPort(
{
path: portName,
baudRate: 9600,
}
);
const pms7003 = new PMS7003(
serialPort, // SerialPort
(result) => console.log(result), // Callback function
true
);
} catch (err) {
console.log(err);
}