upm
1.7.1
Sensor/Actuator repository for libmraa (v2.0.0)
|
API for the MQ2 Gas Sensor. More...
The MQ2 Gas Sensor module is useful for gas leakage detection (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 detection range of 300-10,000 ppm.
Public Member Functions | |
MQ2 (int gasPin) | |
~MQ2 () | |
std::string | name () |
Public Member Functions inherited from Gas | |
Gas (int gasPin) | |
virtual | ~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