Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
JigglyPuff
Date:
Fri Apr 10 01:40:07 2015 +0000
Commit message:
Kate Reynolds

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 da232323c652 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Apr 10 01:40:07 2015 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+// print the serial
+Serial pc(USBTX, USBRX);
+
+AnalogIn photoIn(p20);
+
+int main()
+{
+    pc.baud(19200);                    // set baudrate
+    pc.format(7,SerialBase::None,1);  // set number of bits, parity, and stop bits
+
+    while(1) {
+        x = photoIn.read();
+        pc.printf("%f", x);
+        pc.printf("\n");
+        wait(0.3);
+    }
+}
diff -r 000000000000 -r da232323c652 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Apr 10 01:40:07 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/487b796308b0
\ No newline at end of file