Control PID para una planta RC (control de carga del capacitor), los parámetros se ingresan por medio de un Encoder y se visualizan en una pantalla LCD 16x2.
Diff: DebouncedIn.h
- Revision:
- 0:dd68101b1b99
diff -r 000000000000 -r dd68101b1b99 DebouncedIn.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/DebouncedIn.h Fri Dec 13 04:14:14 2013 +0000 @@ -0,0 +1,31 @@ +#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; + + }; + \ No newline at end of file