#ifndef __ROTARYENCODER_HPP__ #define __ROTARYENCODER_HPP__ #include #include "display.hpp" #include "pins.hpp" class RotaryEncoder { public: RotaryEncoder(uint8_t pinA = ENC_PINA, uint8_t pinB = ENC_PINB) : _encoder{pinA, pinB}, _currentValue{0}, _shift{0} {_encoder.write(0);}; int value_select(Display &display); private: Encoder _encoder; int _currentValue, _shift; }; #endif /* __ROTARYENCODER_HPP__ */