Control PID para un planta RC (control de la carga del capacitor), los parámetros se ingresan por medio de 4 pulsadores, teniendo en cuenta una librería antirebote y el resultado del control se visualiza en una pantalla LCD 16x2.

Dependencies:   TextLCD mbed

Fork of DebouncedIn_HelloWorld by Chris Styles

/media/uploads/Wilmar87/img_4005.jpg

Committer:
Wilmar87
Date:
Fri Dec 13 04:00:56 2013 +0000
Revision:
3:caf76da61c9f
Parent:
0:672241227e0d
change in TextLCD.cpp

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chris 0:672241227e0d 1 #include "mbed.h"
chris 0:672241227e0d 2
chris 0:672241227e0d 3 class DebouncedIn {
chris 0:672241227e0d 4 public:
chris 0:672241227e0d 5 DebouncedIn(PinName in);
chris 0:672241227e0d 6
chris 0:672241227e0d 7 int read (void);
chris 0:672241227e0d 8 operator int();
chris 0:672241227e0d 9
chris 0:672241227e0d 10 int rising(void);
chris 0:672241227e0d 11 int falling(void);
chris 0:672241227e0d 12 int steady(void);
chris 0:672241227e0d 13
chris 0:672241227e0d 14 private :
chris 0:672241227e0d 15 // objects
chris 0:672241227e0d 16 DigitalIn _in;
chris 0:672241227e0d 17 Ticker _ticker;
chris 0:672241227e0d 18
chris 0:672241227e0d 19 // function to take a sample, and update flags
chris 0:672241227e0d 20 void _sample(void);
chris 0:672241227e0d 21
chris 0:672241227e0d 22 // counters and flags
chris 0:672241227e0d 23 int _samples;
chris 0:672241227e0d 24 int _output;
chris 0:672241227e0d 25 int _output_last;
chris 0:672241227e0d 26 int _rising_flag;
chris 0:672241227e0d 27 int _falling_flag;
chris 0:672241227e0d 28 int _state_counter;
chris 0:672241227e0d 29
chris 0:672241227e0d 30 };
chris 0:672241227e0d 31