upm
0.5.1
Sensor/Actuator repository for libmraa (v0.9.1)
|
API for the Grove TP401 Air Quality Sensor. More...
The Grove TP401 Air Quality Sensor module is useful for monitoring air purity indoors. It can detect CO and a wide range of other harmful gases, but, due to a limited detection range, it should be used only when qualitative results are needed. Example applications are air recirculation, ventilation systems, and refreshing sprayers. The sensor is linear and should be roughly sensitive to 0-20 ppm CO from 0-4 V. Note: the sensor requires 2-3 minutes to warm up initially and 48 hours of operation to stabilize completely.
Public Member Functions | |
TP401 (int gasPin) | |
~TP401 () | |
std::string | name () |
float | getPPM () |
Public Member Functions inherited from Gas | |
Gas (int gasPin) | |
~Gas () | |
virtual int | getSampledWindow (unsigned int freqMS, int numberOfSamples, uint16_t *buffer) |
virtual int | findThreshold (thresholdContext *ctx, unsigned int threshold, uint16_t *buffer, int len) |
virtual int | getSampledData (thresholdContext *ctx) |
virtual int | getSample () |
virtual void | printGraph (thresholdContext *ctx, uint8_t resolution) |
Additional Inherited Members | |
Protected Attributes inherited from Gas | |
mraa::Aio | m_aio |
|
inline |
Returns the name of the sensor
float getPPM | ( | ) |
Returns one sample in parts per million (ppm) of CO in the air based on the following sensor calibration: 0-4 V is roughly 0-20 ppm CO