1 #include "EMAVDivSampler.h" 2 #include "VIPCalculation.h" 8 const uint16_t periodMs,
19 return vDivVolts(
average(), _r1KOhm, _r2KOhm, _vRef);
24 return vDivVolts(
last(), _r1KOhm, _r2KOhm, _vRef);
virtual float averageVolts()
Get the mean value in the sample set.
Exponential Moving Average (EMA) analog pin sampler.
EMAVDivSampler(const uint8_t pin, const uint16_t r1KOhm, const uint16_t r2KOhm, const float vRef, const uint16_t periodMs, const float alpha)
virtual float lastVolts()
Get the most recent voltage value.