# sensor-htu21d

> Library to read out a HTU21d humidity/temperature sensor connected via I2C. It depends on the "i2c-bus" library and is tested on a Raspberry Pi 3.

Latest version **1.1.2** (published 2019-03-06) · ISC license · 0 weekly downloads

## Install

```sh
npm install sensor-htu21d
pnpm add sensor-htu21d
yarn add sensor-htu21d
bun add sensor-htu21d
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2019-03-06 |
| First published | 2019-03-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Marcel Indlekofer |
| Maintainers | mejsel |
| Keywords | htu21, htu21d, temperature sensor |

## Links

- npm: https://www.npmjs.com/package/sensor-htu21d
- Repository: https://github.com/mejsel/sensor-htu21d
- Homepage: https://github.com/mejsel/sensor-htu21d#readme
- Issues: https://github.com/mejsel/sensor-htu21d/issues
- npm.io page: https://npm.io/package/sensor-htu21d

## Dependencies (1)

- [i2c-bus](https://npm.io/package/i2c-bus.md) ^4.0.7

## Recent versions

- 1.1.2 (latest) — 2019-03-06
- 1.1.1 — 2019-03-06
- 1.1.0 — 2019-03-06
- 1.0.2 — 2019-03-06
- 1.0.1 — 2019-03-05
- 1.0.0 — 2019-03-05

## README

## Synopsis
Library to read out a HTU21d humidity/temperature sensor connected via I2C. It depends on the "i2c-bus" library and is tested on a Raspberry Pi 3.

## Code Example
```javascript
let Htu21d = require('./htu21d.js');
let htu = new Htu21d(1, 1000);
htu.start();

htu.on('readout-complete', (data) => {
  console.log(data);    // e.g. { temperature: 26.39, humidity: 16.45 }
});

htu.on('error', (error) => {
  console.log(error);
});
```

## Motivation
The HTU21d is capable of measuring humidity with a resolution of 0.04 %rel and temperature with a resolution of 0.01 °C.

## Installation
npm install sensor-htu21d

## Tests
node test.js

## Contributors
Mejsel (marcel.indlekofer@gmail.com)

## License
GPL license.

---
_Source: https://npm.io/package/sensor-htu21d · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
