10#ifndef M5_UNIT_METER_UNIT_A_METER_HPP
11#define M5_UNIT_METER_UNIT_A_METER_HPP
23 M5_UNIT_COMPONENT_HPP_BUILDER(
UnitAmeter, 0x48);
26 constexpr static uint8_t DEFAULT_EEPROM_ADDRESS{0x51};
27 constexpr static float PRESSURE_COEFFICIENT{0.05f};
29 explicit UnitAmeter(
const uint8_t addr = DEFAULT_ADDRESS,
const uint8_t eepromAddr = DEFAULT_EEPROM_ADDRESS)
52 return !empty() ?
correction() *
adc() : std::numeric_limits<float>::quiet_NaN();
59 float _correction{1.0f};
float coefficient() const
Coefficient value.
Definition unit_ADS111x.hpp:274
int16_t adc() const
Oldest measured ADC.
Definition unit_ADS111x.hpp:283
ads111x::Gain gain() const
Gets the programmable gain amplifier.
Definition unit_ADS111x.cpp:104
ADS1115 with EEPROM.
Definition unit_ADS1115.hpp:76
Ameter Unit is a current meter that can monitor the current in real time.
Definition unit_Ameter.hpp:22
float current() const
Oldest current (mA)
Definition unit_Ameter.hpp:50
float resolution() const
Resolution of 1 LSB.
Definition unit_Ameter.hpp:39
float correction() const
Gets the correction value.
Definition unit_Ameter.hpp:44
Top level namespace of M5stack.
ADS1115 Unit for M5UnitUnified.
Gain
Programmable gain amplifier.
Definition unit_ADS111x.hpp:47