|
Nol.A SDK Library 26.11.2
For IoT System Software Development
|
#include <SHTSensor.hpp>
Public Member Functions | |
| SHTI2cSensor (uint8_t i2cAddress, uint16_t i2cCommand, uint8_t duration, float a, float b, float c, float x, float y, float z, uint8_t cmd_Size, TwoWire &wire) | |
| virtual | ~SHTI2cSensor () |
| Destroy the I2C driver without taking ownership of the bus. | |
| virtual bool | readSample () |
| Public Member Functions inherited from SHTSensorDriver | |
| virtual | ~SHTSensorDriver ()=0 |
| Virtual destructor for concrete sensor drivers. | |
| virtual bool | setAccuracy (SHTSensor::SHTAccuracy) |
| float | getHumidity () const |
| float | getTemperature () const |
Public Attributes | |
| uint8_t | mI2cAddress |
| 7-bit I2C sensor address. | |
| uint16_t | mI2cCommand |
| Measurement command sent before reading a sample. | |
| uint8_t | mDuration |
| Measurement delay in milliseconds. | |
| float | mA |
| Temperature conversion offset: temperature = mA + mB * raw / mC. | |
| float | mB |
| Temperature conversion multiplier. | |
| float | mC |
| Nonzero temperature conversion divisor. | |
| float | mX |
| Humidity conversion offset: humidity = mX + mY * raw / mZ. | |
| float | mY |
| Humidity conversion multiplier. | |
| float | mZ |
| Nonzero humidity conversion divisor. | |
| uint8_t | mCmd_Size |
| Measurement command length in bytes. | |
| TwoWire & | mWire |
| Borrowed I2C bus used for sensor transactions. | |
| Public Attributes inherited from SHTSensorDriver | |
| float | mTemperature |
| Cached temperature in degrees Celsius. | |
| float | mHumidity |
| Cached relative humidity in percent. | |
Static Public Attributes | |
| static const uint8_t | EXPECTED_DATA_SIZE |
Base class for i2c SHT Sensor drivers
|
inline |
Constructor for i2c SHT Sensors Takes the i2cAddress to read, the i2cCommand issues when sampling the sensor and the values a, b, c to convert the fixed-point temperature value received by the sensor to a floating point value using the formula: temperature = a + b * (rawTemperature / c) and the values x and y to convert the fixed-point humidity value received by the sensor to a floating point value using the formula: humidity = x + y * (rawHumidity / z) duration is the duration in milliseconds of one measurement
|
inlinevirtual |
Destroy the I2C driver without taking ownership of the bus.
|
virtual |
Returns true if the next sample was read and the values are cached
Reimplemented from SHTSensorDriver.
|
static |
Size of i2c commands to send Size of i2c replies to expect