Data Gator
Hardware and software documentation for the Data Gator project.
Loading...
Searching...
No Matches
AtlasGravitypH Class Reference

Defineds an analog pH sensor interface for the Atlas Gravity pH. More...

#include <Atlas_Gravity_pH.hpp>

Inheritance diagram for AtlasGravitypH:
Collaboration diagram for AtlasGravitypH:

Public Member Functions

 AtlasGravitypH ()
 < Constructor for object, no initialization here.
 
double getpH (double voltage)
 Converts analog voltage reading to a double pH value.
 
std::string getSensorType ()
 Get the sensor brand and model atlas_gravity_ph for debugging.
 
std::string toJSON (double voltage)
 Converts a voltage reading to JSON string object.
 

Detailed Description

Defineds an analog pH sensor interface for the Atlas Gravity pH.

Member Function Documentation

◆ getpH()

double AtlasGravitypH::getpH ( double  voltage)
inlinevirtual

Converts analog voltage reading to a double pH value.

Applies a linear equation to convert between voltage and pH for the given sensor. Requires sensor calibration to be reliable and accurate. Calibration requires following the manufacturer guide and adjusting the two values in the linear equation in this method to produce accurate pH readings.

Parameters
[in]voltageA raw analog reading in volts.
Returns
A double pH value on range [0.001, 14.000]

Reimplemented from pHSensor.

◆ getSensorType()

std::string AtlasGravitypH::getSensorType ( void  )
inlinevirtual

Get the sensor brand and model atlas_gravity_ph for debugging.

Returns
"atlas_gravity_ph"

Reimplemented from pHSensor.

◆ toJSON()

std::string AtlasGravitypH::toJSON ( double  voltage)
inlinevirtual

Converts a voltage reading to JSON string object.

Returns
A JSON string object with PH_RAW (voltage) and PH (pH) fields.

Reimplemented from pHSensor.


The documentation for this class was generated from the following file: