UNPKG

sensor-htu21d

Version:

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.

14 lines (9 loc) 204 B
let Htu21d = require('./htu21d.js'); let htu = new Htu21d(1, 1000); htu.start(); htu.on('readout-complete', (data) => { console.log(data); }); htu.on('error', (error) => { console.log(error); });