Newer
Older
#ifndef POTENTIOMETER_h
#define POTENTIOMETER_h
class Potentiometer {
int EMA_S = 0; //initialization of EMA S
bool _inputFlag = false;
bool _changeFlag = false;
void (*_cb)(Potentiometer*, uint8_t, uint8_t); // Callback function
static const uint8_t kEventStableUpdate = 0;
static const uint8_t kEventUnstableUpdate = 1;
Potentiometer(int pin, int id = 99) : _pin(pin), _id(id);
void setEventHandler(void(*function)(Potentiometer*, uint8_t, uint8_t));
int getValue();
int getId();
void check();