Software para realizar control PID en tarjeta Freescale KL25Z con ENCODER y Display 16x2

Dependents:   PID_Encoder

Committer:
cmorab
Date:
Wed Nov 20 17:32:26 2013 +0000
Revision:
0:13e5c41f8363
Software para realizar control PID en tarjeta Freescale KL25Z con ENCODER  y Display 16x2;

Who changed what in which revision?

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