M5Unit-METER 0.0.3 git rev:c518ea3
|
KMeterISO unitis an integrated K-type thermocouple sensor unit that integrates the functions of "acquisition + isolation + communication". More...
#include <unit_KmeterISO.hpp>
Classes | |
struct | config_t |
Settings for begin. More... | |
Public Member Functions | |
UnitKmeterISO (const uint8_t addr=DEFAULT_ADDRESS) | |
virtual bool | begin () override |
virtual void | update (const bool force=false) override |
bool | readStatus (uint8_t &status) |
Read status. | |
bool | isReady () |
Ready to read data? | |
bool | readFirmwareVersion (uint8_t &ver) |
Read firmware version. | |
Settings for begin | |
config_t | config () |
Gets the configration. | |
void | config (const config_t &cfg) |
Set the configration. | |
Properties | |
kmeterISO::MeasurementUnit | measurementUnit () const |
void | setMeasurementUnit (const kmeterISO::MeasurementUnit munit) |
Measurement data by periodic | |
float | temperature () const |
Oldest temperature. | |
Periodic measurement | |
bool | startPeriodicMeasurement () |
Start periodic measurement in the current settings. | |
bool | startPeriodicMeasurement (const uint32_t interval, const kmeterISO::MeasurementUnit munit=kmeterISO::Celsius) |
Start periodic measurement. | |
bool | stopPeriodicMeasurement () |
Stop periodic measurement. | |
Single shot measurement | |
bool | measureSingleshot (kmeterISO::Data &d, kmeterISO::MeasurementUnit munit=kmeterISO::MeasurementUnit::Celsius, const uint32_t timeoutMs=0) |
Measure temperature single shot. | |
bool | measureInternalSingleshot (kmeterISO::Data &d, kmeterISO::MeasurementUnit munit=kmeterISO::MeasurementUnit::Celsius, const uint32_t timeoutMs=0) |
Measure internal temperature single shot. | |
I2C Address | |
| |
bool | changeI2CAddress (const uint8_t i2c_address) |
Change device I2C address. | |
bool | readI2CAddress (uint8_t &i2c_address) |
Read device I2C address. | |
Protected Member Functions | |
bool | start_periodic_measurement () |
bool | start_periodic_measurement (const uint32_t interval, const kmeterISO::MeasurementUnit munit=kmeterISO::Celsius) |
bool | stop_periodic_measurement () |
bool | read_measurement (kmeterISO::Data &d, const kmeterISO::MeasurementUnit munit) |
bool | read_internal_measurement (kmeterISO::Data &d, const kmeterISO::MeasurementUnit munit) |
M5_UNIT_COMPONENT_PERIODIC_MEASUREMENT_ADAPTER_HPP_BUILDER (UnitKmeterISO, kmeterISO::Data) | |
Protected Attributes | |
std::unique_ptr< m5::container::CircularBuffer< kmeterISO::Data > > | _data {} |
kmeterISO::MeasurementUnit | _munit {kmeterISO::MeasurementUnit::Celsius} |
config_t | _cfg {} |
KMeterISO unitis an integrated K-type thermocouple sensor unit that integrates the functions of "acquisition + isolation + communication".
bool m5::unit::UnitKmeterISO::changeI2CAddress | ( | const uint8_t | i2c_address | ) |
Change device I2C address.
i2c_address | I2C address |
|
inline |
Ready to read data?
bool m5::unit::UnitKmeterISO::measureInternalSingleshot | ( | kmeterISO::Data & | d, |
kmeterISO::MeasurementUnit | munit = kmeterISO::MeasurementUnit::Celsius, | ||
const uint32_t | timeoutMs = 0 ) |
Measure internal temperature single shot.
[out] | data | Measuerd data |
munit | measurement unit | |
timeoutMs | Measurement timeout time(ms) |
|
inline |
Gets the measurement unit on periodic measurement
bool m5::unit::UnitKmeterISO::measureSingleshot | ( | kmeterISO::Data & | d, |
kmeterISO::MeasurementUnit | munit = kmeterISO::MeasurementUnit::Celsius, | ||
const uint32_t | timeoutMs = 0 ) |
Measure temperature single shot.
[out] | data | Measuerd data |
munit | measurement unit | |
timeoutMs | Measurement timeout time(ms) |
bool m5::unit::UnitKmeterISO::readFirmwareVersion | ( | uint8_t & | ver | ) |
Read firmware version.
[out] | ver | version |
bool m5::unit::UnitKmeterISO::readI2CAddress | ( | uint8_t & | i2c_address | ) |
Read device I2C address.
[out] | i2c_address | I2C address |
bool m5::unit::UnitKmeterISO::readStatus | ( | uint8_t & | status | ) |
Read status.
[out] | status | Status |
|
inline |
Set the measurement unit on periodic measurement
|
inline |
Start periodic measurement in the current settings.
|
inline |
Start periodic measurement.
interval | Periodic interval(ms) |
munit | Measurement unit |
|
inline |
Stop periodic measurement.