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>
32class ImpulseCounter :
public VirtualImpulseCounter {
36 bool _detectLowToHigh =
false,
37 bool inputPullup =
true,
38 unsigned int _debounceDelay = 10);
39 ImpulseCounter(
int _impulsePin,
40 bool _detectLowToHigh =
false,
41 bool inputPullup =
true,
42 unsigned int _debounceDelay = 10);
49 uint32_t lastImpulseMillis =
53 int16_t impulsePin = -1;
54 uint16_t debounceDelay = 10;
56 bool detectLowToHigh =
false;
58 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