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:55b07f83af75, committed 2015-05-21
- Comitter:
- gyth
- Date:
- Thu May 21 02:22:22 2015 +0000
- Commit message:
- AUP Xi'an Lab1
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	Thu May 21 02:22:22 2015 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+
+DigitalOut red(D5);
+DigitalOut blue(D8);
+DigitalOut green(D9);
+AnalogIn analog_value(A0);
+int i;
+
+int main() {
+    float meas;
+    int i;
+    
+    while(1) {
+        meas = analog_value.read();
+        
+        i = (int)(meas * 8);
+        red = i & 1;
+        blue = i & 2;
+        green = i & 4;
+        wait(0.2);
+    }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu May 21 02:22:22 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/433970e64889 \ No newline at end of file