wordclock/libraries/Button/Button.h
2019-02-13 19:27:22 +01:00

20 lines
275 B
C++

#ifndef Button_h
#define Button_h
#include <Arduino.h>
typedef void (*ButtonCallbackFunction)();
class Button
{
public:
Button(uint8_t _pin, uint8_t _mode);
void begin();
void loop(ButtonCallbackFunction callback);
private:
uint8_t mode;
uint8_t pin;
};
#endif