upm
0.1.8
Sensor/Actuator repository for libmraa (v0.4.5)
|
C++ API for MQ2 gas sensor. More...
The Grove - Gas Sensor (MQ2) module is useful for gas leakage detecting (in home and industry). It can detect LPG, i-butane, methane, alcohol, Hydrogen, smoke and other combustible gases. It's a medium sensitivity sensor with a detect concentration of 300-10000ppm.
Public Member Functions | |
MQ2 (int gasPin) | |
~MQ2 () | |
std::string | name () |
Public Member Functions inherited from Gas | |
Gas (int gasPin) | |
~Gas () | |
virtual int | getSampledWindow (unsigned int freqMS, unsigned int numberOfSamples, uint16_t *buffer) |
virtual int | findThreshold (thresholdContext *ctx, unsigned int threshold, uint16_t *buffer, unsigned int len) |
virtual int | getSampledData (thresholdContext *ctx) |
virtual int | getSample (thresholdContext *ctx) |
virtual void | printGraph (thresholdContext *ctx, uint8_t resolution) |
Additional Inherited Members | |
Protected Attributes inherited from Gas | |
mraa_aio_context | m_gasCtx |
|
inline |
Return name of the component