Simple sugar dozer emulator in coffee machines.

Dependencies:   mbed

EventCounter.h

Committer:
tbjazic
Date:
2015-01-29
Revision:
0:23fb6d1ad75c

File content as of revision 0:23fb6d1ad75c:

#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