|
M5Unit-ENV 1.3.1 git rev:73f34ff
|
Temperature and humidity, sensor unit. More...
#include <unit_SHT30.hpp>
Classes | |
| struct | config_t |
| Settings for begin. More... | |
Public Member Functions | |
| UnitSHT30 (const uint8_t addr=DEFAULT_ADDRESS) | |
| virtual bool | begin () override |
| virtual void | update (const bool force=false) override |
| bool | writeModeAccelerateResponseTime () |
| Write the mode to ART. | |
Settings for begin | |
| config_t | config () |
| Gets the configration. | |
| void | config (const config_t &cfg) |
| Set the configration. | |
Measurement data by periodic | |
| float | temperature () const |
| Oldest measured temperature (Celsius) | |
| float | celsius () const |
| Oldest measured temperature (Celsius) | |
| float | fahrenheit () const |
| Oldest measured temperature (Fahrenheit) | |
| float | humidity () const |
| Oldest measured humidity (RH) | |
Periodic measurement | |
| bool | startPeriodicMeasurement (const sht30::MPS mps, const sht30::Repeatability rep) |
| Start periodic measurement. | |
| bool | stopPeriodicMeasurement () |
| Stop periodic measurement. | |
Single shot measurement | |
| bool | measureSingleshot (sht30::Data &d, const sht30::Repeatability rep=sht30::Repeatability::High, const bool stretch=true) |
| Measurement single shot. | |
Reset | |
| bool | softReset () |
| Soft reset. | |
| bool | generalReset () |
| General reset. | |
Heater | |
| bool | startHeater () |
| Start heater. | |
| bool | stopHeater () |
| Stop heater. | |
Status | |
| bool | readStatus (sht30::Status &s) |
| Read status. | |
| bool | clearStatus () |
| Clear status. | |
Serial number | |
| bool | readSerialNumber (uint32_t &serialNumber) |
| Read the serial number value. | |
| bool | readSerialNumber (char *serialNumber) |
| Read the serial number string. | |
Protected Member Functions | |
| bool | start_periodic_measurement (const sht30::MPS mps, const sht30::Repeatability rep) |
| bool | stop_periodic_measurement () |
| bool | read_measurement (sht30::Data &d) |
| M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitSHT30, sht30::Data) | |
Protected Attributes | |
| std::unique_ptr< m5::container::CircularBuffer< sht30::Data > > | _data {} |
| config_t | _cfg {} |
Temperature and humidity, sensor unit.
| bool m5::unit::UnitSHT30::clearStatus | ( | ) |
| bool m5::unit::UnitSHT30::generalReset | ( | ) |
General reset.
Reset using I2C general call
| bool m5::unit::UnitSHT30::measureSingleshot | ( | sht30::Data & | d, |
| const sht30::Repeatability | rep = sht30::Repeatability::High, | ||
| const bool | stretch = true ) |
Measurement single shot.
| [out] | data | Measuerd data |
| rep | Repeatability accuracy level | |
| stretch | Enable clock stretching if true |
| bool m5::unit::UnitSHT30::readSerialNumber | ( | char * | serialNumber | ) |
Read the serial number string.
| [out] | serialNumber | Output buffer |
| bool m5::unit::UnitSHT30::readSerialNumber | ( | uint32_t & | serialNumber | ) |
Read the serial number value.
| [out] | serialNumber | serial number value |
| bool m5::unit::UnitSHT30::readStatus | ( | sht30::Status & | s | ) |
Read status.
| [out] | s | Status |
| bool m5::unit::UnitSHT30::softReset | ( | ) |
Soft reset.
The sensor to reset its system controller and reloads calibration data from the memory.
| bool m5::unit::UnitSHT30::startHeater | ( | ) |
Start heater.
|
inline |
Start periodic measurement.
| mps | Measuring frequency |
| rep | Repeatability accuracy level |
| bool m5::unit::UnitSHT30::stopHeater | ( | ) |
Stop heater.
|
inline |
Stop periodic measurement.
| bool m5::unit::UnitSHT30::writeModeAccelerateResponseTime | ( | ) |
Write the mode to ART.
After issuing the ART command the sensor will start acquiring data with a frequency of 4Hz