Completed Part 1

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
ese350billjack
Date:
Wed Feb 24 01:16:39 2016 +0000
Commit message:
Reading ADC pin 15

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
--- /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";
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Feb 24 01:16:39 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/252557024ec3
\ No newline at end of file