1#ifndef HUMIDISTAT_FLOWSENSOR_H
2#define HUMIDISTAT_FLOWSENSOR_H
14 0.094003 *
ipow(3.3 / 1023, 5),
15 -0.564312 *
ipow(3.3 / 1023, 4),
16 1.374705 *
ipow(3.3 / 1023, 3),
17 -1.601495 *
ipow(3.3 / 1023, 2),
18 1.060657 / 1023 * 3.3,
Read flow rate using a Omron D6F-P0010 MEMS flow sensor.
static constexpr double coeffs[]
Coefficients of the polynomial approximation to the sensor response (and voltage mapping)
FlowSensor(uint8_t pin)
Constructor.
double readFlowrate() const
Read the flow rate.
constexpr T ipow(T base, unsigned int pow)
Constexpr function for computing integer power.