programa para hacer control PID simple
Fork of DebouncedIn_HelloWorld by
este programa permite hacer control PID simple, se configuran 4 parametros como: SETPOINT KP KI KD
USA 4 PULSADORES ASI AUMENTAR: aumenta el parametro seleccionado por menu DISMINUIR : disminuye el parametro seleccionado por menu MENU: cambia de menu o campo de ingreso ENTER: confirma el menu y se sale
DebouncedIn.h
- Committer:
- tony63
- Date:
- 2013-10-11
- Revision:
- 1:83ffe66ee756
- Parent:
- 0:672241227e0d
File content as of revision 1:83ffe66ee756:
#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; };