programa para probar el conversor A/D sobre el PC

Dependencies:   mbed

MONTAJE REQUERIDO USAR UN POTENCIOMETRO Y CONECTAR 3.3V Y GND /media/uploads/tony63/pot.png

Files at this revision

API Documentation at this revision

Comitter:
tony63
Date:
Tue Mar 14 23:07:00 2017 +0000
Commit message:
programa para probar el conversor A/D sobre el PC

Changed in this revision

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
diff -r 000000000000 -r 130e0223a2d8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 14 23:07:00 2017 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+Serial pc(USBTX, USBRX);
+AnalogIn input(PTB0);
+
+int main() {
+    float volt;
+    while(1){
+        wait(0.1);
+        volt=input*1000;
+        pc.printf("Voltaje: %f\n", volt);
+    }
+
+}
diff -r 000000000000 -r 130e0223a2d8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 14 23:07:00 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/e1686b8d5b90
\ No newline at end of file