LDR

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
kantapon501
Date:
Mon Dec 07 17:57:14 2015 +0000
Commit message:
LDR

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 f357437c7ebd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Dec 07 17:57:14 2015 +0000
@@ -0,0 +1,16 @@
+#include "mbed.h"
+
+AnalogIn LDR(A0);
+Serial pc(SERIAL_TX, SERIAL_RX); 
+
+int main()
+{
+    pc.baud(19200);
+    pc.printf("Hello\n");
+    while (1) 
+    {
+        float LDR=In.read();
+        pc.printf("%f\n",LDR);
+        wait(1);
+    }
+}
diff -r 000000000000 -r f357437c7ebd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Dec 07 17:57:14 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/165afa46840b
\ No newline at end of file