imprime un voltaje leido en el lcd

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
josedaparte
Date:
Thu Nov 26 21:18:11 2015 +0000
Commit message:
hgfhd

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Thu Nov 26 21:18:11 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 26 21:18:11 2015 +0000
@@ -0,0 +1,26 @@
+#include "mbed.h"
+#include "TextLCD.h"
+#include "AnalogIn.h"
+
+AnalogIn leer(PTC1);
+
+TextLCD lcd(PTE20, PTE21, PTE22, PTE23, PTB20, PTE30, TextLCD::LCD16x2);
+
+int main() {
+
+float lectura;
+float voltaje;
+
+    while(1){
+    
+    lectura = leer.read();
+    voltaje = lectura*3.3;
+    lcd.cls();
+    lcd.printf("%f",lectura);
+    lcd.locate(1,1);
+    lcd.printf("%f", voltaje);
+    wait(2);
+    
+    
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 26 21:18:11 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file