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

Overrides the interface provided by pHSensor.hpp for a generic analog pH sensor. More...

#include <GenericPH.hpp>

Inheritance diagram for GenericPH:
Collaboration diagram for GenericPH:

Public Member Functions

double getpH (double voltage)
 Convert voltage reading to pH value.
 
std::string getSensorType ()
 Get identifier string for debugging.
 
std::string toJSON (double voltage)
 Converts voltage reading to JSON object for debugging and data collection.
 

Private Attributes

const double MIN_V = 0
 
const double MAX_V = 3.33
 

Detailed Description

Overrides the interface provided by pHSensor.hpp for a generic analog pH sensor.

Member Function Documentation

◆ getpH()

double GenericPH::getpH ( double  voltage)
inlinevirtual

Convert voltage reading to pH value.

Returns
The pH as a double

Reimplemented from pHSensor.

◆ getSensorType()

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

Get identifier string for debugging.

Returns
"generic_pH" string

Reimplemented from pHSensor.

◆ toJSON()

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

Converts voltage reading to JSON object for debugging and data collection.

Reimplemented from pHSensor.


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