![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
PID
Dependencies: Debounced FPointer QEI TextLCD keypad mbed
Diff: main.cpp
- Revision:
- 1:7394ade42a1d
- Parent:
- 0:413ccc1d18e1
diff -r 413ccc1d18e1 -r 7394ade42a1d main.cpp --- a/main.cpp Fri Jun 13 16:49:12 2014 +0000 +++ b/main.cpp Mon Jun 16 04:11:36 2014 +0000 @@ -293,30 +293,7 @@ //pid=1-(PI/100); led=1; led2=0; - /*PWMmodule2(pp,pid); - PWMmodule1(pp,0);*/ - - } - //Fin de funcion rampa. - - //Inicio del PID - - /* - if (PI>=PIant) { - pid=PI/100; - led=0; - led2=1; - PWMmodule1(pp,pid); - PWMmodule2(pp,0); - } - - if (PI<PIant) - { - pid2=1-(PI/100); - led=1; - led2=0; - PWMmodule2(pp,pid2); - PWMmodule1(pp,0); + } */ PIant=PI; @@ -326,15 +303,6 @@ lcd.locate(8,1); lcd.printf("u:%.1f",PI); - //Fin del PID - /*lcd.cls(); - lcd.locate(0,0); - lcd.printf("T:%d",medd); - lcd.locate(0,1); - lcd.printf("u:%.2f",PI); - lcd.locate(5,0); - lcd.printf(":%.2f",inte); - */ T=T+Ts; }