You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
275 B

5 years ago
  1. #ifndef Button_h
  2. #define Button_h
  3. #include <Arduino.h>
  4. typedef void (*ButtonCallbackFunction)();
  5. class Button
  6. {
  7. public:
  8. Button(uint8_t _pin, uint8_t _mode);
  9. void begin();
  10. void loop(ButtonCallbackFunction callback);
  11. private:
  12. uint8_t mode;
  13. uint8_t pin;
  14. };
  15. #endif