ModularSensors > Files > sensors / PaleoTerraRedox.h

PaleoTerraRedox.h file

Contains the PaleoTerraRedox semsor subclass and the variable subclass PaleoTerraRedox_Volt.

These are for the PaleoTerra redox sensors.

This depends on Testato's SoftwareWire library if software I2C is needed.

Classes

class PaleoTerraRedox
The Sensor sub-class for the PaleoTerra redox sensor.
class PaleoTerraRedox_Volt
The Variable sub-class used for the voltage output from a PaleoTerra redox sensor.

Defines

#define PTR_NUM_VARIABLES = 1
Sensor::_numReturnedValues; the PaleoTerra redox sensor can report 1 value.
#define MCP3421_ADR = 0x68
The default I2C address of the PaleoTerra redox sensor.

Sensor Timing

The sensor timing for a PaleoTerra redox probe

#define PTR_WARM_UP_TIME_MS = 1
Sensor::_warmUpTime_ms; the PaleoTerra redox sensor is immediately warmed up.
#define PTR_STABILIZATION_TIME_MS = 0
Sensor::_stabilizationTime_ms; the PaleoTerra redox sensor is immediately stable.
#define PTR_MEASUREMENT_TIME_MS = 67
Sensor::_measurementTime_ms; the PaleoTerra redox sensor takes 67ms to complete a measurement.

Voltage

The voltage variable from a PaleoTerra redox probe

  • Accuracy is ±5mV

PaleoTerraRedox_Volt(Sensor* parentSense, const char* uuid = "", const char* varCode = PTR_VOLTAGE_DEFAULT_CODE) explicit

Construct a new PaleoTerraRedox_Volt object.

Parameters
parentSense The parent PaleoTerraRedox providing the result values.
uuid A universally unique identifier (UUID or GUID) for the variable; optional with the default value of an empty string.
varCode A short code to help identify the variable in files; optional with a default value of "PTRVoltage".

#define PTR_VOLTAGE_RESOLUTION = 2
Decimals places in string representation; voltage should have 2.
#define PTR_VOLTAGE_VAR_NUM = 0
Sensor variable number; voltage is stored in sensorValues[0].
#define PTR_VOLTAGE_VAR_NAME = "Voltage"
Variable name in ODM2 controlled vocabulary; "Voltage".
#define PTR_VOLTAGE_UNIT_NAME = "millivolt"
Variable unit name in ODM2 controlled vocabulary; "millivolt" (mV)
#define PTR_VOLTAGE_DEFAULT_CODE = "PTRVoltage"
Default variable short code; "PTRVoltage".