Completed Part 1

Dependencies:   mbed

Revision:
0:613255191ca1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Feb 24 01:16:39 2016 +0000
@@ -0,0 +1,12 @@
+#include "mbed.h"
+#include <iostream>
+AnalogIn   ain(A0);
+
+int main() {
+    while (1) {
+        // test the voltage on the initialized analog pin
+        //  and if greater than 0.3 * VCC set the digital pin
+        //  to a logic 1 otherwise a logic 0
+        cout << ain.read() << "\n";
+    }
+}