Gas Class
Item Index
Methods
Gas
-
gasPin
Instantiates a Gas object
Parameters:
-
gasPinNumberPin where gas is connected
Returns:
getSampledWindow
-
freqMS -
numberOfSamples -
buffer
Gets samples from the gas sensor according to the provided window and number of samples
Parameters:
-
freqMSNumberTime between each sample (in milliseconds)
-
numberOfSamplesNumberNumber of sample to sample for this window
-
bufferUint16_t *Buffer with sampled data
Returns:
findThreshold
-
ctx -
threshold -
buffer -
len
Given the sampled buffer, this method returns TRUE/FALSE if the threshold is reached
Parameters:
-
ctxThresholdContext *Threshold context
-
thresholdNumberSample threshold
-
bufferUint16_t *Buffer with samples
-
lenNumberBuffer length
Returns:
getSampledData
-
ctx
Returns average data for the sampled window
Parameters:
-
ctxThresholdContext *Threshold context
Returns:
getSample
()
Number
Returns one sample from the sensor
Returns:
printGraph
-
ctx -
resolution
Prints a running average of the threshold context
Parameters:
-
ctxThresholdContext *Threshold context
-
resolutionNumberundefined