#ifndef SERVOMOTOT_COMPONENT_H #define SERVOMOTOT_COMPONENT_H #include enum Position { LEFT, MIDDLE, RIGHT }; class ServoMotorComponent { public: ServoMotorComponent(int PIN, unsigned long updatePeriod = 100, float step = 0.1); void setDesiredPosition(Position desiredPosition); bool isConnected(); void refresh(); private: int PIN; float currentPosition; float desiredposition; Servo myservo; unsigned long lastUpTime; unsigned long updatePeriod; float step; }; #endif //SERVOMOTOT_COMPONENT_H