#include <Electrochemical-Gas-Sensor-SOLDERED.h>
|
| ElectrochemicalGasSensor (sensorType _t, uint8_t _adcAddr=DEFAULT_ADC_ADDR, int _configPin=-1) |
| Constructor on custom address.
|
|
bool | begin () |
| Init the sensor and begin measuring with the ADC, must be called before using.
|
|
bool | configureLMP () |
| Configure the LMP91000, has to be done at startup.
|
|
double | getVoltage () |
| get the voltage which the ADS is currently measuring
|
|
double | getPPM () |
| Make a measurement with the ADC and calculate the PPM value of the measured gas.
|
|
double | getPPB () |
| Calcualte PPB values from PPM.
|
|
double | getAveragedPPM (uint8_t _numMeasurements=5, uint8_t _secondsDelay=2) |
| Calculate an averaged PPM measurement from a number of separate measurements.
|
|
double | getAveragedPPB (uint8_t _numMeasurements=5, uint8_t _secondsDelay=2) |
| Calculate an averaged PPB measurement from a number of separate measurements.
|
|
void | setCustomTiaGain (float _tiaGain) |
| Set a custom number of the kOhms in the TIA gain.
|
|
void | setCustomZeroCalibration (double calibration) |
| Set a custom value for the zero calibration.
|
|
◆ ElectrochemicalGasSensor()
ElectrochemicalGasSensor::ElectrochemicalGasSensor |
( |
sensorType | _t, |
|
|
uint8_t | _adcAddr = DEFAULT_ADC_ADDR, |
|
|
int | _configPin = -1 ) |
Constructor on custom address.
- Parameters
-
sensorType | _t The type of the sensor |
uint8_t | _adcAddr The custom address of the ADC |
◆ begin()
bool ElectrochemicalGasSensor::begin |
( |
| ) |
|
Init the sensor and begin measuring with the ADC, must be called before using.
- Returns
- True if it was successful, false if it failed
◆ configureLMP()
bool ElectrochemicalGasSensor::configureLMP |
( |
| ) |
|
Configure the LMP91000, has to be done at startup.
- Returns
- True if it was successful, false if it failed
◆ getAveragedPPB()
double ElectrochemicalGasSensor::getAveragedPPB |
( |
uint8_t | _numMeasurements = 5, |
|
|
uint8_t | _secondsDelay = 2 ) |
Calculate an averaged PPB measurement from a number of separate measurements.
- Note
- This is a blocking function, it won't exit until it's completed
- Parameters
-
uint8_t | _numMeasurements How many measurements to do |
uint8_t | _secondsDelay How many seconds to wait between each measurement |
- Returns
- double value of the calculated averaged PPB
◆ getAveragedPPM()
double ElectrochemicalGasSensor::getAveragedPPM |
( |
uint8_t | _numMeasurements = 5, |
|
|
uint8_t | _secondsDelay = 2 ) |
Calculate an averaged PPM measurement from a number of separate measurements.
- Note
- This is a blocking function, it won't exit until it's completed
- Parameters
-
uint8_t | _numMeasurements How many measurements to do |
uint8_t | _secondsDelay How many seconds to wait between each measurement |
- Returns
- double value of the calculated averaged PPM
◆ getInternalZeroPercent()
float ElectrochemicalGasSensor::getInternalZeroPercent |
( |
| ) |
|
|
private |
Get the internal zero % setting as an actual float.
- Returns
- The internal zero as a float
◆ getPPB()
double ElectrochemicalGasSensor::getPPB |
( |
| ) |
|
Calcualte PPB values from PPM.
- Returns
- double value of PPB
◆ getPPM()
double ElectrochemicalGasSensor::getPPM |
( |
| ) |
|
Make a measurement with the ADC and calculate the PPM value of the measured gas.
- Returns
- double value of the PPM
◆ getTiaGain()
float ElectrochemicalGasSensor::getTiaGain |
( |
| ) |
|
|
private |
Get the actual number of the kOhms in the TIA gain.
- Note
- Only used internally in the class
- Returns
- float of the TIA gain depending on the config
◆ getVoltage()
double ElectrochemicalGasSensor::getVoltage |
( |
| ) |
|
get the voltage which the ADS is currently measuring
- Returns
- double value of the voltage in volts
◆ setCustomTiaGain()
void ElectrochemicalGasSensor::setCustomTiaGain |
( |
float | _tiaGain | ) |
|
Set a custom number of the kOhms in the TIA gain.
- Note
- This is if you're using an external resistor
- Returns
- None
◆ setCustomZeroCalibration()
void ElectrochemicalGasSensor::setCustomZeroCalibration |
( |
double | calibration | ) |
|
Set a custom value for the zero calibration.
- Parameters
-
calibration | Voltage level at 0ppm |
◆ adcAddr
uint8_t ElectrochemicalGasSensor::adcAddr |
|
private |
◆ ads
ADS1015* ElectrochemicalGasSensor::ads |
|
private |
◆ configPin
int ElectrochemicalGasSensor::configPin |
|
private |
◆ internalZeroPercent
float ElectrochemicalGasSensor::internalZeroPercent |
|
private |
◆ lmp
◆ tiaGainInKOHms
float ElectrochemicalGasSensor::tiaGainInKOHms |
|
private |
◆ type
The documentation for this class was generated from the following files: