#include <src/sensors/AtlasScientificDO.h>
AtlasScientificDO
class
The Sensor sub-class for the Atlas Scientific EZO dissolved oxygen circuit.
- Reference
- Detailed Descriptions
Base classes
- class AtlasParent
- A parent class for Atlas EZO circuits and sensors.
Constructors, destructors, conversion operators
- AtlasScientificDO(TwoWire* theI2C, int8_t powerPin, uint8_t i2cAddressHex = 0x61, uint8_t measurementsToAverage = 1)
- Construct a new Atlas Scientific DO object using a secondary hardware I2C instance.
- AtlasScientificDO(int8_t powerPin, uint8_t i2cAddressHex = 0x61, uint8_t measurementsToAverage = 1) explicit
- Construct a new Atlas Scientific DO object using the primary hardware I2C instance.
- ~AtlasScientificDO()
- Destroy the Atlas Scientific DO object.
Public functions
- bool setup(void) -> bool override
- Do any one-time preparations needed before the sensor will be able to take readings.
Function documentation
AtlasScientificDO:: AtlasScientificDO(TwoWire* theI2C,
int8_t powerPin,
uint8_t i2cAddressHex = 0x61,
uint8_t measurementsToAverage = 1)
Construct a new Atlas Scientific DO object using a secondary hardware I2C instance.
Parameters | |
---|---|
theI2C | A TwoWire instance for I2C communication. Due to the limitations of the Arduino core, only a hardware I2C instance can be used. For an AVR board, there is only one I2C instance possible and this form of the constructor should not be used. For a SAMD board, this can be used if a secondary I2C port is created on one of the extra SERCOMs. |
powerPin | The pin on the mcu controlling powering to the Atlas DO circuit. Use -1 if it is continuously powered.
|
i2cAddressHex | The I2C address of the Atlas circuit; optional with the Atlas-supplied default address of 0x61. |
measurementsToAverage | The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1. |
AtlasScientificDO:: AtlasScientificDO(int8_t powerPin,
uint8_t i2cAddressHex = 0x61,
uint8_t measurementsToAverage = 1) explicit
Construct a new Atlas Scientific DO object using the primary hardware I2C instance.
Parameters | |
---|---|
powerPin | The pin on the mcu controlling powering to the Atlas DO circuit. Use -1 if it is continuously powered.
|
i2cAddressHex | The I2C address of the Atlas circuit; optional with the Atlas-supplied default address of 0x61. |
measurementsToAverage | The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1. |
bool AtlasScientificDO:: setup(void) override
Do any one-time preparations needed before the sensor will be able to take readings.
Returns | bool True if the setup was successful. |
---|
This begins the Wire library (sets pin modes for I2C), tells the O2 circuit to report all possible measurement parameters, and sets the status bit if successful. The circuit must be powered for setup.