10#ifndef M5_UNIT_METER_UNIT_V_METER_HPP
11#define M5_UNIT_METER_UNIT_V_METER_HPP
23 M5_UNIT_COMPONENT_HPP_BUILDER(
UnitVmeter, 0x49);
26 constexpr static uint8_t DEFAULT_EEPROM_ADDRESS{0x53};
27 constexpr static float PRESSURE_COEFFICIENT{0.01591895f};
29 explicit UnitVmeter(
const uint8_t addr = DEFAULT_ADDRESS,
const uint8_t eepromAddr = DEFAULT_EEPROM_ADDRESS)
53 return !empty() ?
correction() *
adc() : std::numeric_limits<float>::quiet_NaN();
60 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
Voltmeter Unit is a voltage meter that can monitor the voltage in real time.
Definition unit_Vmeter.hpp:22
float correction() const
Gets the correction value.
Definition unit_Vmeter.hpp:45
float resolution() const
Resolution of 1 LSB.
Definition unit_Vmeter.hpp:39
float voltage() const
Oldest voltage (mV)
Definition unit_Vmeter.hpp:51
Top level namespace of M5stack.
ADS1115 Unit for M5UnitUnified.
Gain
Programmable gain amplifier.
Definition unit_ADS111x.hpp:47