practica_controlremoto

Dependencies:   Pulse1 TextLCD mbed

Fork of control_irda by Johana Cano Velez

Revision:
6:1cf5b602a007
Parent:
5:85c0acb48e40
--- a/main.cpp	Fri May 23 18:26:17 2014 +0000
+++ b/main.cpp	Wed May 28 16:44:55 2014 +0000
@@ -20,9 +20,9 @@
 int num[num_bits];//cadena para almacenar todos los tiempos que conforman los bits de datos
 
 int boton=0;
-const int dec1=55;
-const int dec2=47;
-const int dec4=39;
+const int dec1=133;
+const int dec2=142;
+const int dec3=134;
 
 int dato; // tiempo de cada dato que se lee
   
@@ -38,11 +38,11 @@
       
         lcd.cls();
         lcd.locate(2,0);
-        lcd.printf("Control Irda");
+        lcd.printf("Control");
         wait(3);
         lcd.cls();
         lcd.locate(0,0);
-        lcd.printf("Teclas 1 2 o 4");
+        lcd.printf("Teclas 1__ 2 __3");
           
 ini1: fflush( stdin );
       header=0;
@@ -116,11 +116,11 @@
                         led2=0;
                 }
                 
-              if(boton==dec4)
+              if(boton==dec3)
                  {
                         led3=!led3;
                         lcd.cls();
-                        lcd.printf("Presiono 4"); 
+                        lcd.printf("Presiono 3"); 
                         lcd.locate(0,1);
                         lcd.printf("nbit=%d",num_bits);
                         wait(2);
@@ -138,12 +138,12 @@
                         led3=0;    
                  }
                     
-                if ((boton!=dec4)&&(boton!=dec2)&&(boton!=dec1)&&(boton!=0))
+                if ((boton!=dec3)&&(boton!=dec2)&&(boton!=dec1)&&(boton!=0))
                 { 
                        lcd.cls();
                        lcd.printf("tecla no progamada");
                        lcd.locate(0,1);
-                       lcd.printf("nbit=%d",num_bits);
+                       lcd.printf("nbit=%d",boton);
                        wait(2);
                        lcd.cls();
                        lcd.locate(0,0);