upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
API for the Grove MQ2 Gas Sensor. More...
The Grove 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 | |
synchronized void | delete () |
MQ2 (int gasPin) | |
String | name () |
![]() | |
synchronized void | delete () |
Gas (int gasPin) | |
int | getSampledWindow (long freqMS, short[] numberOfSamples) |
int | findThreshold (thresholdContext ctx, long threshold, short[] buffer) |
int | getSampledData (thresholdContext ctx) |
int | getSample () |
void | printGraph (thresholdContext ctx, short resolution) |
String name | ( | ) |
Returns the name of the sensor