Adafruit HTS221 Library
Classes | Macros | Enumerations
Adafruit_HTS221.h File Reference
#include "Arduino.h"
#include <Adafruit_BusIO_Register.h>
#include <Adafruit_I2CDevice.h>
#include <Adafruit_SPIDevice.h>
#include <Adafruit_Sensor.h>
#include <Wire.h>

Go to the source code of this file.

Classes

class  Adafruit_HTS221_Humidity
 Adafruit Unified Sensor interface for the humidity sensor component of HTS221. More...
 
class  Adafruit_HTS221_Temp
 Adafruit Unified Sensor interface for the temperature sensor component of HTS221. More...
 
class  Adafruit_HTS221
 Class that stores state and functions for interacting with the HTS221 I2C Digital Potentiometer. More...
 

Macros

#define HTS221_I2CADDR_DEFAULT   0x5F
 HTS221 default i2c address.
 
#define HTS221_CHIP_ID   0xBC
 HTS221 default device id from WHOAMI.
 
#define HTS221_CTRL_REG_1   0x20
 First control regsiter; PD, OBDU, ODR.
 
#define HTS221_CTRL_REG_2   0x21
 Second control regsiter; BOOT, Heater, ONE_SHOT.
 
#define HTS221_CTRL_REG_3   0x22
 Third control regsiter; DRDY_H_L, DRDY.
 
#define HTS221_HUMIDITY_OUT   0x28
 Humidity output register (LSByte)
 
#define HTS221_TEMP_OUT_L   0x2A
 Temperature output register (LSByte)
 
#define HTS221_H0_RH_X2   0x30
 Humididy calibration LSB values.
 
#define HTS221_H1_RH_X2   0x31
 Humididy calibration LSB values.
 
#define HTS221_T0_DEGC_X8   0x32
 First byte of T0, T1 calibration values.
 
#define HTS221_T1_T0_MSB   0x35
 Top 2 bits of T0 and T1 (each are 10 bits)
 
#define HTS221_H0_T0   0x36
 Humididy calibration Time 0 value.
 
#define HTS221_H0_T1   0x3A
 Humididy calibration Time 1 value.
 
#define HTS221_T0_OUT   0x3C
 T0_OUT LSByte.
 
#define HTS221_T1_OUT   0x3E
 T1_OUT LSByte.
 
#define HTS221_WHOAMI   0x0F
 Chip ID register.
 

Enumerations

enum  hts221_rate_t { HTS221_RATE_ONE_SHOT, HTS221_RATE_1_HZ, HTS221_RATE_7_HZ, HTS221_RATE_12_5_HZ }
 Allowed values for setDataRate.
 

Detailed Description

I2C Driver for the Adafruit HTS221 Humidity and Temperature Sensor library

This is a library for the Adafruit HTS221 breakout:
https://www.adafruit.com/products/453X

Adafruit invests time and resources providing this open source code,

please support Adafruit and open-source hardware by purchasing products from Adafruit!

BSD license (see license.txt)