test code to log ldr value

Dependencies:   mbed

Revision:
0:e2162e735bfe
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Jan 05 11:00:59 2017 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+
+AnalogIn ldr(PTB1);
+Serial pc(USBTX, USBRX); // tx, rx
+int main() {
+    unsigned int value;
+    while(1) {
+        if(pc.readable()) {
+            if (pc.getc() == 'A')
+                value = ldr*100.0;
+                pc.printf("%2d\n",value);
+        }
+        wait(0.01);
+    }
+}
\ No newline at end of file