HTS221 pressure sensor

HTS221 is a temperature sensor that can be used by i2c. This sensor is available on ST X-NUCLEO-IKS01A1 expansion board. datasheet is available on ST web site : http://www.st.com/content/st_com/en/products/mems-and-sensors/humidity-sensors/hts221.html

Use the HTS221 (About Modules) module for it.

You can wire this up as follows:

Device Pin Espruino Pico
D15 (SCL) B6
D14 (SDA) B7
GND GND
+5V VBAT
+3V3 3.3

Note: To avoid links, you can use the ArduinoPico adaptor. In this case, check the pins to use for SPI1, it should be B8 and B9.

How to use module:

I2C1.setup({scl:B6,sda:B7}); // on EspruinoPico board
I2C1.setup({scl:B8,sda:B9}); // on Nucleo boards
var temp = require("HTS221").connect(I2C1, 0);
temp.ObtainCalibratedTemperatureCoefficient();
temp.getTemperature(print);

Besides the I2C connection, connect() takes an optional argument to provide debug information :

I2C1.setup({scl:B6,sda:B7}); // on EspruinoPico board
I2C1.setup({scl:B8,sda:B9}); // on Nucleo boards
var temp = require("HTS221").connect(I2C1, 1);

Buying:

Shield can be purchased from many places:

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