C++ API for Gas sensors.
More...
This file defines the Gas Analog sensors virtual functions
|
mraa_aio_context | m_gasCtx |
|
Instanciates a Gas object
- Parameters
-
gasPin | pin where gas is connected |
int getSampledWindow |
( |
unsigned int |
freqMS, |
|
|
unsigned int |
numberOfSamples, |
|
|
uint16_t * |
buffer |
|
) |
| |
|
virtual |
Get samples from gas sensor according to provided window and number of samples
- Parameters
-
freqMS | time between each sample (in microseconds) |
numberOfSamples | number of sample to sample for this window |
buffer | bufer with sampled data |
int findThreshold |
( |
thresholdContext * |
ctx, |
|
|
unsigned int |
threshold, |
|
|
uint16_t * |
buffer, |
|
|
unsigned int |
len |
|
) |
| |
|
virtual |
Given sampled buffer this method will return TRUE/FALSE if threshold was reached
- Parameters
-
ctx | threshold context |
threshold | sample threshold |
buffer | buffer with samples |
len | bufer len |
Return avarage data for the sampled window
- Parameters
-
Return one sample from the sensor
- Parameters
-
Print running average of threshold context
- Parameters
-
The documentation for this class was generated from the following files:
- /var/lib/jenkins/workspace/upm-doc/src/gas/gas.h
- /var/lib/jenkins/workspace/upm-doc/src/gas/gas.cxx