upm
0.4.1
Sensor/Actuator repository for libmraa (v0.8.0)
|
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 | |
synchronized void | delete () |
TP401 (int gasPin) | |
String | name () |
float | getPPM () |
![]() | |
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) |
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
String name | ( | ) |
Returns the name of the sensor