describe una lectura analogica basica

Dependencies:   TextLCD mbed

Revision:
2:7d8925e51f85
Parent:
1:d4b9822b8df4
--- a/main.cpp	Thu Oct 03 21:55:19 2013 +0000
+++ b/main.cpp	Mon Sep 28 22:26:22 2015 +0000
@@ -1,18 +1,21 @@
 // ejemplo lectura analoga
 // EJEMPLO CON UN LCD PARA EL MODULO FRDM-KL25Z PARA LECTURA ANALOGA
+//y enviar al pc por puerto serial
 
 #include "mbed.h"
 #include "TextLCD.h"
+Serial pc(USBTX,USBRX); //puertos del PC
 AnalogIn Vin(PTC2);
 TextLCD lcd(PTB10, PTB11, PTE2, PTE3, PTE4, PTE5); // rs, e, d4-d7
 
 int main( ){
     
     lcd.cls();
-    wait(0.5);
+    wait(0.1);
     while(1){
     lcd.cls();
-    lcd.printf("V(%f)", Vin.read());
-    wait(0.5);
+    lcd.printf("Volt(%f)", Vin.read());
+    pc.printf("%f\n", Vin.read()); 
+    wait(0.1);
 }
 }
\ No newline at end of file