27 #ifndef _EASYUINO_WATER_FLOW_SENSOR_h 28 #define _EASYUINO_WATER_FLOW_SENSOR_h 30 #include "Utilities.h" 33 #define PULSE_TIMEOUT 500 76 virtual void pulseHandler(IN
unsigned long callTimestamp);
80 static void InterruptCaller();
bool begin()
Used to put the device ready to receive requests.
bool isFlowing() const
Checks if there there are flow in the sensor.
~WaterFlowSensor()
Destructor.
uint8_t _sensorPin
Arduino pin connected to the sensor pulse pin.
Definition: WaterFlowSensor.h:51
virtual void pulseHandler(IN unsigned long callTimestamp)
Called by the interruption ISR for each pulse.
General class that provides the common API behaviour for all the devices/sensors. ...
Definition: Device.h:42
WaterFlowSensor(IN uint8_t sensorPin)
Constructor.
void end()
Used to stop the device API.
volatile unsigned long _lastPulseTimestamp
Timestamp with the last time a pulse was detected.
Definition: WaterFlowSensor.h:54
WaterFlowSensor is an API offers the ability to know if it is flowing something through the sensor or...
Definition: WaterFlowSensor.h:43