71 MQ9(
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-9 gas sensor, typically used for detecting LPG, carbon monoxide, and methane.
Definition: MQ9.h:14
double ReadGasValue() const override
Reads the current LPG PPM for the sensor's raw reading (from the precomputed cache).
Definition: MQ9.cpp:129
MQ9()
Builds a default MQ-9 (LPG / carbon monoxide / methane) sensor and initializes its datasheet values.
Definition: MQ9.cpp:15
std::string ToString() const override
Serializes the MQ-9's gas name, raw reading, and LPG PPM to a string.
Definition: MQ9.cpp:168
double CalculateLiquefiedPetroleumGasPPM(const double &sensorGasValueInVolts) const
Computes the LPG concentration (PPM) from the sensor's output voltage using an exponential fit of the...
Definition: MQ9.cpp:149
void Initialize() override
Initializes the MQ-9's datasheet values (its LPG gas curve) and precomputes a PPM value for every pos...
Definition: MQ9.cpp:101
virtual ~MQ9()
Destroys the sensor, turning it off first.
Definition: MQ9.cpp:85
RumPi is the library's top-level facade.
Definition: AlertManager.h:6