open-index/open-npm huggingface dataset:
npm package: @nanomatic/pzem-004t
Description: PZEM-004T sensor implementation
Author: NANOmatic
Latest version: 1.0.2

<p align="center">
  <a href="" rel="noopener">
  <img src="https://images-na.ssl-images-amazon.com/images/I/61DKPtJCAeL._AC_SY355_.jpg" alt="PRZEM-004T"></a>
</p>
<h3 align="center">@nanomatic/pzem-004t</h3>

<div align="center">

[![Status](https://img.shields.io/badge/status-active-success.svg)]()
</div>

---

<p align="center">
    PZEM-004T sensor implementation ⚡
    <br />
</p>

## 📝 Table of Contents

- [📝 Table of Contents](#-table-of-contents)
- [🏁 Getting Started <a name = "getting_started"></a>](#-getting-started-)
  - [Installing](#installing)
  - [Using](#using)
- [⛏️ Built With <a name = "tech_stack"></a>](#️-built-with-)
- [📦 Dependencies](#-dependencies)
- [✍️ Authors <a name = "authors"></a>](#️-authors-)
- [🎉 Acknowledgments <a name = "acknowledgments"></a>](#-acknowledgments-)

## 🏁 Getting Started <a name = "getting_started"></a>

### Installing

```
npm i @nanomatic/pzem-004t
```

### Using

Example code below:

```ts
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 <a name = "tech_stack"></a>
- [ts-node-dev](https://www.npmjs.com/package/ts-node-dev) - TypeScript Node Dev
- [tsc-watch](https://www.npmjs.com/package/tsc-watch) - The nodemon for TypeScript
- [TSLint](https://www.npmjs.com/package/tslint) - TypeScript linter
- [NodeJs](https://nodejs.org/en/) - Test Environment

## 📦 Dependencies
- [modbus-serial](https://www.npmjs.com/package/modbus-serial) - A pure JavaScript implemetation of MODBUS-RTU

## ✍️ Authors <a name = "authors"></a>

- [@NANOmatic](https://github.com/NANOmatic) - Idea & Initial work

## 🎉 Acknowledgments <a name = "acknowledgments"></a>

- Special thanks for Sebastian for working together and giving ideas 😉