Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 0:1960122209f8, committed 2013-08-10
- Comitter:
- jksoft
- Date:
- Sat Aug 10 03:13:09 2013 +0000
- Commit message:
- Rev1
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	Sat Aug 10 03:13:09 2013 +0000
@@ -0,0 +1,19 @@
+#include "mbed.h"
+
+#define SENSOR_NUM  4
+
+AnalogIn floor_sensor[] = { (p15) , (p16) , (p17) , (p18) };
+Serial pc(USBTX, USBRX);
+
+int main() {
+
+    int ain[SENSOR_NUM];
+
+    while(1) {
+        for(int i=0;i<SENSOR_NUM;i++)
+        {
+            ain[i] = floor_sensor[i].read_u16();
+        }
+        pc.printf("[0]:%05d\t[1]:%05d\t[2]:%05d\t[3]:%05d\r\n",ain[0],ain[1],ain[2],ain[3]);
+    }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Aug 10 03:13:09 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/e3affc9e7238 \ No newline at end of file