ModularSensors > Classes > Sensor > AtlasParent > AtlasScientificEC
ModularSensors > Modules > Atlas EZO-EC > AtlasScientificEC


AtlasScientificEC class

The Sensor sub-class for the Atlas Scientific conductivity circuit and sensor.

Base classes

class AtlasParent
A parent class for Atlas EZO circuits and sensors.

Constructors, destructors, conversion operators

AtlasScientificEC(TwoWire* theI2C, int8_t powerPin, uint8_t i2cAddressHex = ATLAS_COND_I2C_ADDR, uint8_t measurementsToAverage = 1)
Construct a new Atlas Scientific EC object using a secondary hardware I2C instance.
AtlasScientificEC(int8_t powerPin, uint8_t i2cAddressHex = ATLAS_COND_I2C_ADDR, uint8_t measurementsToAverage = 1) explicit
Construct a new Atlas Scientific EC object using the primary hardware I2C instance.
~AtlasScientificEC()
Destroy the Atlas Scientific EC object.

Public functions

bool setup(void ) override
Do any one-time preparations needed before the sensor will be able to take readings.

Function documentation

AtlasScientificEC(TwoWire* theI2C, int8_t powerPin, uint8_t i2cAddressHex = ATLAS_COND_I2C_ADDR, uint8_t measurementsToAverage = 1)

Construct a new Atlas Scientific EC 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 EC circuit. Use -1 if it is continuously powered.

  • Requires a 3.3V and 5V power supply
i2cAddressHex The I2C address of the Atlas circuit; optional with the Atlas-supplied default address of 0x64.
measurementsToAverage The number of measurements to take and average before giving a "final" result from the sensor; optional with a default value of 1.

AtlasScientificEC(int8_t powerPin, uint8_t i2cAddressHex = ATLAS_COND_I2C_ADDR, uint8_t measurementsToAverage = 1) explicit

Construct a new Atlas Scientific EC object using the primary hardware I2C instance.

Parameters
powerPin

The pin on the mcu controlling powering to the Atlas EC circuit. Use -1 if it is continuously powered.

  • Requires a 3.3V and 5V power supply
i2cAddressHex The I2C address of the Atlas circuit; optional with the Atlas-supplied default address of 0x64.
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 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 CO2 circuit to report all possible measurement parameters, and sets the status bit if successful. The circuit must be powered for setup.