tarea#3
Dependencies: FPointer TextLCD keypad mbed
Fork of Tarea2_Teclado by
Diff: main.cpp
- Revision:
- 2:4c3de5a37f24
- Parent:
- 1:c1571c87c8ee
- Child:
- 3:3ebf00293772
diff -r c1571c87c8ee -r 4c3de5a37f24 main.cpp --- a/main.cpp Fri Mar 28 22:33:04 2014 +0000 +++ b/main.cpp Thu Apr 03 03:46:11 2014 +0000 @@ -6,7 +6,7 @@ #include"FPointer.h" //Librería complementaria para libreria keypad TextLCD lcd(PTB10, PTB11, PTE2, PTE3, PTE4, PTE5); // rs, e, d4-d7 -Keypad keypad(PTA2,PTD4,PTD3,PTD7,PTA13,PTD5,PTD0,PTD2); //Entradas del teclado +Keypad keypad(PTA2,PTD4,PTD3,PTD7,PTA13,PTD5,PTD0,PTD2); //Entradas del teclado (4r,3r,2r,1r,8,7,6,5) AnalogIn Vin(PTB0); //Voltaje de alimentación AnalogOut Vout(PTE30); //Marcar la salida analógica @@ -50,7 +50,7 @@ lcd.locate(3,0); lcd.printf("%.0f",sp); Vout=2.5; - wait(0.2); + wait(0.1); Vout=0; } else if(j==1){ @@ -64,6 +64,9 @@ if(kp>999)kp=999; lcd.locate(11,0); lcd.printf(" "); lcd.locate(11,0); lcd.printf("%.0f",kp); + Vout=2.5; + wait(0.1); + Vout=0; } else if(j==2){ if (q!=1 && ki<10){ @@ -75,7 +78,10 @@ } if(ki>999)ki=999; lcd.locate(3,1); lcd.printf(" "); - lcd.locate(3,1); lcd.printf("%.0f",ki); + lcd.locate(3,1); lcd.printf("%.0f",ki); + Vout=2.5; + wait(0.1); + Vout=0; } else{ if (q!=1 && kd<10){ @@ -90,6 +96,9 @@ lcd.locate(11,1); lcd.printf("%.0f",kd); } ind=0; cero=0; + Vout=2.5; + wait(0.1); + Vout=0; } uint32_t cbAfterInput(uint32_t index) { @@ -183,11 +192,11 @@ } if(ind==11){ Vout=2.5; - wait(0.1); + wait(0.01); Vout=0; - wait(0.05); - Vout=2.5; - wait(0.1); + wait(0.02); + Vout=3.3; + wait(0.3); Vout=0; if (k==0){ sp=0;