Analog in test.

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
halfpitch
Date:
Thu Sep 01 01:36:07 2011 +0000
Commit message:

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 471e7471a24e main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 01 01:36:07 2011 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+AnalogIn ain(p20);
+DigitalOut led(LED1);
+
+int main() {
+    while (1){
+        
+        printf("analog in = %f\n", ain.read());
+        if(ain > 0.3) {
+            led = 1;
+        } else {
+            led = 0;
+        }
+    }
+}
\ No newline at end of file
diff -r 000000000000 -r 471e7471a24e mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Sep 01 01:36:07 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/63bcd7ba4912