71 MQ6(
const unsigned int& digitalOutputPinNumber);
142 std::string
ToString()
const override;
Base class for the MQ-series gas sensors (MQ2, MQ7, ...).
Definition: GasSensor.h:19
Interface for analog-to-digital converter components (e.g.
Definition: AnalogDigitalConverterComponent.h:14
MQ-6 gas sensor, typically used for detecting LPG and propane.
Definition: MQ6.h:14
double ReadGasValue() const override
Reads the current propane PPM for the sensor's raw reading (from the precomputed cache).
Definition: MQ6.cpp:129
std::string ToString() const override
Serializes the MQ-6's gas name, raw reading, and propane PPM to a string.
Definition: MQ6.cpp:170
MQ6()
Builds a default MQ-6 (LPG / propane) sensor and initializes its datasheet values.
Definition: MQ6.cpp:15
double CalculatePropanePPM(const double &sensorGasValueInVolts) const
Computes the propane concentration (PPM) from the sensor's output voltage using a power-law fit of th...
Definition: MQ6.cpp:149
void Initialize() override
Initializes the MQ-6's datasheet values (its propane gas curve) and precomputes a PPM value for every...
Definition: MQ6.cpp:101
virtual ~MQ6()
Destroys the sensor, turning it off first.
Definition: MQ6.cpp:85
RumPi is the library's top-level facade.
Definition: AlertManager.h:6