Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
SHT25 Class Reference
#include <lib_SHT25.h>
Public Types | |
| enum | enum_sht_prec |
enumerator of the different precision of the sensor More... | |
Public Member Functions | |
| SHT25 (PinName sda, PinName scl, enum_sht_prec precision=SHT_PREC_RH12T14, int frequency=SHT_I2C_FREQUENCY) | |
| make new SHT25 instance connected to sda, scl I2C pins | |
| void | getData (float *tempC, float *relHumidity) |
| return Temperature(°C) and Humidity | |
| float | getTemperature (void) |
| return Temperature(°C) | |
| float | getHumidity (void) |
| return Humidity | |
| bool | setPrecision (const enum_sht_prec precision) |
| set data precision | |
| bool | softReset (void) |
| soft reset the sensor | |
| void | waitSafeHeat (void) |
| wait safe heat for sensor | |
Detailed Description
SHT25 class.
Definition at line 57 of file lib_SHT25.h.
Member Enumeration Documentation
| enum enum_sht_prec |
enumerator of the different precision of the sensor
Definition at line 62 of file lib_SHT25.h.
Constructor & Destructor Documentation
| SHT25 | ( | PinName | sda, |
| PinName | scl, | ||
| enum_sht_prec | precision = SHT_PREC_RH12T14, |
||
| int | frequency = SHT_I2C_FREQUENCY |
||
| ) |
make new SHT25 instance connected to sda, scl I2C pins
- Parameters:
-
sda I2C pin scl I2C pin precision SHT25 precision for humidity(default 12 bits) and temperature(default 14 bits) frequency I2C frequency, default 100KHz and maximum 400KHz
Definition at line 34 of file lib_SHT25.cpp.
Member Function Documentation
| void getData | ( | float * | tempC, |
| float * | relHumidity | ||
| ) |
return Temperature(°C) and Humidity
- Parameters:
-
tempC address to return Temperature relHumidity address to return Humidity
- Returns:
- none
Definition at line 44 of file lib_SHT25.cpp.
| float getHumidity | ( | void | ) |
| float getTemperature | ( | void | ) |
return Temperature(°C)
- Parameters:
-
none
- Returns:
- Temperature(°C)
Definition at line 57 of file lib_SHT25.cpp.
| bool setPrecision | ( | const enum_sht_prec | precision ) |
set data precision
- Parameters:
-
precision { SHT_PREC_RH12T14 = 0x00, SHT_PREC_RH08T12 = 0x01, SHT_PREC_RH10T13 = 0x80, SHT_PREC_RH11T11 = 0x81 }
- Returns:
- true on I2C acknoledge
Definition at line 102 of file lib_SHT25.cpp.
| bool softReset | ( | void | ) |
soft reset the sensor
- Parameters:
-
none
- Returns:
- true on I2C acknoledge
Definition at line 108 of file lib_SHT25.cpp.
| void waitSafeHeat | ( | void | ) |
wait safe heat for sensor
- Parameters:
-
none
- Returns:
- none
Definition at line 114 of file lib_SHT25.cpp.
Generated on Thu Jul 14 2022 22:23:55 by
1.7.2