práctica 2 ejercicio 10

Dependencies:   mbed-rtos mbed

Fork of PR2EJ10 by MII1SistElec

Files at this revision

API Documentation at this revision

Comitter:
carlospomar
Date:
Thu Nov 09 13:52:15 2017 +0000
Commit message:
practica2 ejercicio10

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib 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
diff -r 000000000000 -r db97f76420a5 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 09 13:52:15 2017 +0000
@@ -0,0 +1,18 @@
+#include "mbed.h"
+#include "rtos.h"
+
+AnalogIn Sw (PB_0); // pulsador conectado al pin A3
+
+int main ()
+{
+    float leer;
+    float ver;
+
+    while (1) {
+        leer = Sw.read(); // lee el valor
+        ver = leer * 3.3; // convierte el valor al rango 0-5V
+// mostrar valores
+        printf("medida = %f = %f mV\n\r", leer, ver);
+        wait(1.0);
+    }
+}
diff -r 000000000000 -r db97f76420a5 mbed-rtos.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed-rtos.lib	Thu Nov 09 13:52:15 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed-rtos/#5713cbbdb706
diff -r 000000000000 -r db97f76420a5 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 09 13:52:15 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb
\ No newline at end of file