Loom_ADS1115 class
ADS1115 External ADC sensor module.
Contents
Base classes
- class LoomI2CSensor
- Abstract root for I2C sensor modules.
Protected variables
- Adafruit_ADS1115 ads1115
- < Underlying ADS1115 sensor manager instance
CONSTRUCTORS / DESTRUCTOR
-
Loom_ADS1115(LoomManager* manager,
const byte i2c_address = ADS1015_ADDRESS,
const uint8_t mux_port = 255,
const bool analog_0_enabled = true,
const bool analog_1_enabled = true,
const bool analog_2_enabled = true,
const bool analog_3_enabled = true,
const bool diff_0_enabled = false,
const bool diff_1_enabled = false,
const Gain gain = Gain::
GAIN_TWOTHIRDS) - Constructor.
- Loom_ADS1115(LoomManager* manager, JsonArrayConst p)
- Constructor that takes Json Array, extracts args and delegates to regular constructor.
- ~Loom_ADS1115() defaulted virtual
- Destructor.
OPERATION
PRINT INFORMATION
- void print_config() const override
- Display the configuration settings of the module.
- void print_measurements() const override
- Print the last set of measurements taken.
Function documentation
Loom_ ADS1115:: Loom_ADS1115(LoomManager* manager,
const byte i2c_address = ADS1015_ADDRESS,
const uint8_t mux_port = 255,
const bool analog_0_enabled = true,
const bool analog_1_enabled = true,
const bool analog_2_enabled = true,
const bool analog_3_enabled = true,
const bool diff_0_enabled = false,
const bool diff_1_enabled = false,
const Gain gain = Gain:: GAIN_TWOTHIRDS)
Constructor.
Parameters | |
---|---|
manager | |
i2c_address in | Set(Int) | <0x10> | {0x10, 0x11} | I2C address |
mux_port in | Int | <255> | [0-16] | Port on multiplexer |
analog_0_enabled in | Bool | <true> | {true, false} | Enable A0 for reading |
analog_1_enabled in | Bool | <true> | {true, false} | Enable A1 for reading |
analog_2_enabled in | Bool | <true> | {true, false} | Enable A2 for reading |
analog_3_enabled in | Bool | <true> | {true, false} | Enable A3 for reading |
diff_0_enabled in | Bool | <false> | {true, false} | Enable a differential measurement between A0 and A1 |
diff_1_enabled in | Bool | <false> | {true, false} | Enable a differential measurement between A2 and A3 |
gain |
Loom_ ADS1115:: Loom_ADS1115(LoomManager* manager,
JsonArrayConst p)
Constructor that takes Json Array, extracts args and delegates to regular constructor.
Parameters | |
---|---|
manager | |
p in | The array of constuctor args to expand |
void Loom_ ADS1115:: package(JsonObject json) override
Package a modules measurements or state.
Parameters | |
---|---|
json out | Object to put data into |
void Loom_ ADS1115:: print_measurements() const override
Print the last set of measurements taken.
Does not package the data.