Gas Class
Item Index
Methods
Gas
-
gasPin
Instantiates a Gas object
Parameters:
-
gasPin
NumberPin 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:
-
freqMS
NumberTime between each sample (in milliseconds)
-
numberOfSamples
NumberNumber of sample to sample for this window
-
buffer
Uint16_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:
-
ctx
ThresholdContext *Threshold context
-
threshold
NumberSample threshold
-
buffer
Uint16_t *Buffer with samples
-
len
NumberBuffer length
Returns:
getSampledData
-
ctx
Returns average data for the sampled window
Parameters:
-
ctx
ThresholdContext *Threshold context
Returns:
getSample
()
Number
Returns one sample from the sensor
Returns:
printGraph
-
ctx
-
resolution
Prints a running average of the threshold context
Parameters:
-
ctx
ThresholdContext *Threshold context
-
resolution
Numberundefined