compartido
/
PR2EJ10
práctica 2 ejercicio 10
Fork of PR2EJ10 by
Revision 0:db97f76420a5, committed 2017-11-09
- Comitter:
- carlospomar
- Date:
- Thu Nov 09 13:52:15 2017 +0000
- Commit message:
- practica2 ejercicio10
Changed in this revision
--- /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); + } +}
--- /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
--- /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