Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lsongdev/dsensor
:chart_with_upwards_trend: Digital universal particle concentration sensor ⏲️
https://github.com/lsongdev/dsensor
air-quality air-quality-sensor hardware hcho iot plantower
Last synced: 7 days ago
JSON representation
:chart_with_upwards_trend: Digital universal particle concentration sensor ⏲️
- Host: GitHub
- URL: https://github.com/lsongdev/dsensor
- Owner: lsongdev
- License: mit
- Created: 2017-01-15T06:00:14.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-12T15:03:42.000Z (7 months ago)
- Last Synced: 2024-12-31T10:05:21.476Z (9 days ago)
- Topics: air-quality, air-quality-sensor, hardware, hcho, iot, plantower
- Language: JavaScript
- Homepage: https://npmjs.org/dsensor
- Size: 6.26 MB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## dsensor ![dsensor](https://img.shields.io/npm/v/dsensor.svg)
> Digital universal particle concentration sensor
### Installation
```bash
$ npm i [-g] dsensor
```### Example
```js
const HCHO = require('dsensor/HCHO');const sensor = new HCHO("/dev/cu.SLAB_USBtoUART");
sensor.on('message', message => {
console.log(message.toString()); // outputs: "HCHO: 0.001Mg/m3"
});sensor.on("open", () => {
setInterval(() => {
sensor.send('query');
}, 3000);
});
```![](docs/PMS5003.jpg)
![](docs/DS-HCHO.jpg)### Contributing
- Fork this Repo first
- Clone your Repo
- Install dependencies by `$ npm install`
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Publish your local branch, Open a pull request
- Enjoy hacking <3### MIT
---