![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Tarea #4 encoder con sonido al utilizar el pulsador
Dependencies: QEI TextLCD-modificada mbed
Fork of Tarea4 by
DebouncedIn.h
- Committer:
- salondonog
- Date:
- 2013-11-15
- Revision:
- 0:d7388a87aeb7
File content as of revision 0:d7388a87aeb7:
#include "mbed.h" class DebouncedIn { public: DebouncedIn(PinName in); int read (void); operator int(); int rising(void); int falling(void); int steady(void); private : // objects DigitalIn _in; Ticker _ticker; // function to take a sample, and update flags void _sample(void); // counters and flags int _samples; int _output; int _output_last; int _rising_flag; int _falling_flag; int _state_counter; };