jose ortega cervantes / Mbed 2 deprecated flexometrodigital

Dependencies:   mbed TextLCD

Revision:
2:a18f03867915
Parent:
1:83a13087626e
--- a/main.cpp	Fri Feb 19 14:38:05 2016 +0000
+++ b/main.cpp	Mon Feb 22 05:26:50 2016 +0000
@@ -1,5 +1,11 @@
 #include "mbed.h"
+#include "TextLCD.h"
+
 Serial serialpc( USBTX,USBRX);
+TextLCD lcd(D0,D1,D2,D3,D4,D5);
+
+
+
 InterruptIn Echo(D8);
 DigitalOut Trigg(D9);
 Timer timer;
@@ -31,9 +37,19 @@
         }
              
              dist=dist/58.0;
+             if(dist>5){
+                 led=1;
+                 }else{
+                     led=0;
+             }
+           lcd.locate(0,0);
+             lcd.printf("la distancia es");
+             lcd.locate(0,1);
+             lcd.printf("%f cm",dist);
+             wait(.3);
              
              
-             serialpc.printf("distancia %f cm\n",dist);
-             wait(.2);
+             
+            
          }
     }
\ No newline at end of file