A simple program that receives a value over analog input and displays it on a terminal.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
tbjazic
Date:
Thu Dec 18 09:27:05 2014 +0000
Commit message:
Initial commit.

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 c033c4dfdf94 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Dec 18 09:27:05 2014 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+
+AnalogIn in(p17);
+Serial pc(USBTX, USBRX);
+
+int main() {
+    float value;
+    while(1) {
+        value = in;
+        pc.printf("\n\rValue received over analog in: %f", value);
+        wait(1);
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r c033c4dfdf94 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Dec 18 09:27:05 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4fc01daae5a5
\ No newline at end of file