Simple sugar dozer emulator in coffee machines.
Dependencies: mbed
Diff: EventCounter.h
- Revision:
- 0:23fb6d1ad75c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EventCounter.h Thu Jan 29 11:09:25 2015 +0000 @@ -0,0 +1,18 @@ +#ifndef EVENT_COUNTER_H +#define EVENT_COUNTER_H + +#include "mbed.h" + +class EventCounter { + public: + EventCounter(PinName pin, int initialCount); + int getCount(); + void reset(); + private: + InterruptIn input; + int count; + void event(); + Timer debounce; +}; + +#endif // EVENT_COUNTER_H \ No newline at end of file