Adafruit SHT4x Library
|
#include <Adafruit_SHT4x.h>
Public Member Functions | |
Adafruit_SHT4x (void) | |
SHT4x constructor. | |
~Adafruit_SHT4x (void) | |
SHT4x destructor. | |
bool | begin (TwoWire *theWire=&Wire) |
uint32_t | readSerial (void) |
bool | reset (void) |
void | setPrecision (sht4x_precision_t prec) |
Sets the precision rating - more precise takes longer! More... | |
sht4x_precision_t | getPrecision (void) |
Gets the precision rating - more precise takes longer! More... | |
void | setHeater (sht4x_heater_t heat) |
Sets the heating setting - more heating uses more power and takes longer. More... | |
sht4x_heater_t | getHeater (void) |
Gets the heating setting - more heating uses more power and takes longer. More... | |
bool | getEvent (sensors_event_t *humidity, sensors_event_t *temp) |
Gets the humidity sensor and temperature values as sensor events. More... | |
Adafruit_Sensor * | getTemperatureSensor (void) |
Gets the Adafruit_Sensor object for the SHT4x's temperature sensor. More... | |
Adafruit_Sensor * | getHumiditySensor (void) |
Gets the Adafruit_Sensor object for the SHT4x's humidity sensor. More... | |
Protected Attributes | |
float | _temperature |
Last reading's temperature (C) | |
float | _humidity |
Last reading's humidity (percent) | |
uint16_t | _sensorid_humidity |
ID number for humidity. | |
uint16_t | _sensorid_temp |
ID number for temperature. | |
Adafruit_I2CDevice * | i2c_dev = NULL |
Pointer to I2C bus interface. | |
Adafruit_SHT4x_Temp * | temp_sensor = NULL |
Temp sensor data object. | |
Adafruit_SHT4x_Humidity * | humidity_sensor |
Humidity sensor data object. More... | |
Friends | |
class | Adafruit_SHT4x_Temp |
class | Adafruit_SHT4x_Humidity |
Driver for the Adafruit SHT4x Temperature and Humidity breakout board.
bool Adafruit_SHT4x::begin | ( | TwoWire * | theWire = &Wire | ) |
Initialises the I2C bus, and assigns the I2C address to us.
theWire | The I2C bus to use, defaults to &Wire |
uint32_t Adafruit_SHT4x::readSerial | ( | void | ) |
Gets the ID register contents.
bool Adafruit_SHT4x::reset | ( | void | ) |
Performs a soft reset of the sensor to put it into a known state.
void Adafruit_SHT4x::setPrecision | ( | sht4x_precision_t | prec | ) |
Sets the precision rating - more precise takes longer!
prec | The desired precision setting, will be used during reads |
sht4x_precision_t Adafruit_SHT4x::getPrecision | ( | void | ) |
Gets the precision rating - more precise takes longer!
void Adafruit_SHT4x::setHeater | ( | sht4x_heater_t | heat | ) |
Sets the heating setting - more heating uses more power and takes longer.
heat | The desired heater setting, will be used during reads |
sht4x_heater_t Adafruit_SHT4x::getHeater | ( | void | ) |
Gets the heating setting - more heating uses more power and takes longer.
bool Adafruit_SHT4x::getEvent | ( | sensors_event_t * | humidity, |
sensors_event_t * | temp | ||
) |
Gets the humidity sensor and temperature values as sensor events.
humidity | Sensor event object that will be populated with humidity data |
temp | Sensor event object that will be populated with temp data |
Adafruit_Sensor * Adafruit_SHT4x::getTemperatureSensor | ( | void | ) |
Gets the Adafruit_Sensor object for the SHT4x's temperature sensor.
Adafruit_Sensor * Adafruit_SHT4x::getHumiditySensor | ( | void | ) |
Gets the Adafruit_Sensor object for the SHT4x's humidity sensor.
|
friend |
Gives access to private members to Temp data object
|
friend |
Gives access to private members to Humidity data object
|
protected |
Humidity sensor data object.