10#ifndef M5_UNIT_METER_UNIT_ADS1115_HPP
11#define M5_UNIT_METER_UNIT_ADS1115_HPP
38 return write_multiplexer(mux);
43 return write_gain(
gain);
48 return write_comparator_mode(b);
53 return write_comparator_polarity(b);
58 return write_latching_comparator(b);
63 return write_comparator_queue(c);
80 explicit UnitAVmeterBase(
const uint8_t addr = DEFAULT_ADDRESS,
const uint8_t eepromAddr = 0x00);
85 virtual bool begin()
override;
87 inline float calibrationFactor()
const
89 return _calibrationFactor;
95 virtual Adapter* duplicate_adapter(
const uint8_t ch)
override;
97 bool validChild()
const
106 float _calibrationFactor{1.0f};
ADS1115 unit.
Definition unit_ADS1115.hpp:22
virtual bool writeMultiplexer(const ads111x::Mux mux) override
Write the input multiplexer.
Definition unit_ADS1115.hpp:36
virtual bool writeGain(const ads111x::Gain gain) override
Write the programmable gain amplifier.
Definition unit_ADS1115.hpp:41
virtual bool writeLatchingComparator(const bool b) override
Write the latching comparator.
Definition unit_ADS1115.hpp:56
virtual bool writeComparatorMode(const bool b) override
Write the comparator mode.
Definition unit_ADS1115.hpp:46
virtual bool writeComparatorQueue(const ads111x::ComparatorQueue c) override
Write the comparator queue.
Definition unit_ADS1115.hpp:61
virtual bool writeComparatorPolarity(const bool b) override
Write the comparator polarity.
Definition unit_ADS1115.hpp:51
Base class for ADS111x series.
Definition unit_ADS111x.hpp:219
ads111x::Gain gain() const
Gets the programmable gain amplifier.
Definition unit_ADS111x.cpp:104
ADS1115 with EEPROM.
Definition unit_ADS1115.hpp:76
virtual bool writeGain(const ads111x::Gain gain) override
Write the programmable gain amplifier.
Definition unit_ADS1115.cpp:65
Accessor unit to EEPROM that holds calibration data.
Definition unit_EEPROM.hpp:31
Top level namespace of M5stack.
Base class for ADS111x families.
Sampling
Data rate setting (samples per second)
Definition unit_ADS111x.hpp:61
Mux
Input multiplexer.
Definition unit_ADS111x.hpp:31
ComparatorQueue
the value determines the number of successive conversions exceeding the upper orlower threshold requi...
Definition unit_ADS111x.hpp:77
Gain
Programmable gain amplifier.
Definition unit_ADS111x.hpp:47
Accessor unit to EEPROM that holds calibration information.