@nanomatic/pzem-004t
v1.0.2
Published
PZEM-004T sensor implementation
Downloads
5
Maintainers
Readme
📝 Table of Contents
🏁 Getting Started
Installing
npm i @nanomatic/pzem-004t
Using
Example code below:
import { PZEM004T } from '@nanomatic/pzem-004t'
const pzem004t = new PZEM004T({ port: '/dev/ttyUSB1' });
setInterval(async() => {
try {
const data = await pzem004t.getData();
console.log(data);
} catch ({ message }) {
console.log(`Error: ${message}`);
}
}, 500);
⛏️ Built With
- ts-node-dev - TypeScript Node Dev
- tsc-watch - The nodemon for TypeScript
- TSLint - TypeScript linter
- NodeJs - Test Environment
📦 Dependencies
- modbus-serial - A pure JavaScript implemetation of MODBUS-RTU
✍️ Authors
- @NANOmatic - Idea & Initial work
🎉 Acknowledgments
- Special thanks for Sebastian for working together and giving ideas 😉