#ifndef __BUTTON_HPP__
#define __BUTTON_HPP__

#include <stdint.h>

class Button {

public:
  Button(uint8_t pin) : _pin{pin} {};
  ~Button() {};

  void setup(void);
  bool is_pressed(void);

protected:
  uint8_t _pin;

private:
};

class AnalogButton : Button {
public:
  AnalogButton(uint8_t pin, int vRef = -1) : Button(pin), _vRef{vRef} {};
  virtual ~AnalogButton() {};

  void setup(void);
  bool is_button_pressed(void);

private:
  int _vRef;

  void calibrate(void);
};

#endif /* __BUTTON_HPP__ */
