SI7021(-A20) I2C Temperature and Humidity Sensor

Si7021(-A20) is a I2C Humidity and Temperature sensor by Silicon Labs. See the Datasheet for more information.

This module is interfacing all the commands available on the Si7021(-A20) module. Temperature and Humidity formulas are provided by the Sensor's Datasheet.

You can wire this up as follows:

Device Pin Espruino
1 (GND) GND
2 (VCC) 3.3
3 (SDA) B9
4 (SCL) B8

Put `4K7 Ohm pull up resistors to both SDA and SCL

How to use the module:

I2C1.setup({sda:B9, scl:B8});
var foo = require("SI7021").connect(I2C1);
foo.readTemperature(); // in celsius

Reference

// Read Relative Humidity command.
SI7021.prototype.readRelativeHmidity = function (holdMaster) { ... }

// Read Temperature command.
SI7021.prototype.readTemperature = function (holdMaster) { ... }

// Read Temperature from previous Relative Humidity measurement command.
SI7021.prototype.readTemperatureFromPrevRHMeasure = function () { ... }

// Reset command.
SI7021.prototype.reset = function () { ... }

// Write Relative Humidity User register 1 command.
SI7021.prototype.writeRelHumidityUserReg1 = function (value) { ... }

// Read Relative Humidity User register 1 command.
SI7021.prototype.readRelHumidityUserReg1 = function () { ... }

// Write Heater Control Register command.
SI7021.prototype.writeHeaterControlReg = function (value) { ... }

// Read Heater Control Register command.
SI7021.prototype.readHeaterControlReg = function () { ... }

// Read Electronic ID 1 byte command.
SI7021.prototype.readElectronicId1Byte = function () { ... }

// Read Electronic ID 2 byte command.
SI7021.prototype.readElectronicId2Byte = function () { ... }

// Read Firmware Revision command.
SI7021.prototype.readFirmwareRev = function () { ... }

// Sets the I2C port.
exports.connect = function (I2C) { ... }

Buying

A Breakout Board is available at Adafruit.

This page is auto-generated from GitHub. If you see any mistakes or have suggestions, please let us know.