19#ifndef SRC_SUPLA_SENSOR_IMPULSE_COUNTER_H_
20#define SRC_SUPLA_SENSOR_IMPULSE_COUNTER_H_
22#include <supla-common/proto.h>
23#include <supla/sensor/virtual_impulse_counter.h>
30class ImpulseCounter :
public VirtualImpulseCounter {
34 bool _detectLowToHigh =
false,
35 bool inputPullup =
true,
36 unsigned int _debounceDelay = 10);
37 ImpulseCounter(
int _impulsePin,
38 bool _detectLowToHigh =
false,
39 bool inputPullup =
true,
40 unsigned int _debounceDelay = 10);
47 uint32_t lastImpulseMillis =
51 int16_t impulsePin = -1;
52 uint16_t debounceDelay = 10;
54 bool detectLowToHigh =
false;
56 bool inputPullup =
true;
void onInit() override
Third method called on element in SuplaDevice.begin()
Definition impulse_counter.cpp:59
void onFastTimer() override
Method called on fast timer interupt.
Definition impulse_counter.cpp:70