in

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
harseed951
Date:
Thu Jul 02 09:56:56 2015 +0000
Commit message:
in

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 Jul 02 09:56:56 2015 +0000
@@ -0,0 +1,73 @@
+#include "mbed.h"
+
+DigitalOut a(LED1),b(LED2),c(LED3),d(LED4);
+InterruptIn sw(p5);
+void down() {
+    a=1;b=1,c=1,d=1;
+    wait(1);
+    a=1;b=1;c=1;d=0;
+    wait(1);
+    a=1;b=1;c=0;d=1;
+    wait(1);
+    a=1;b=1;c=0;d=0;
+    wait(1);
+    a=1;b=0;c=1;d=1;
+    wait(1);
+    a=1;b=0;c=1;d=1;
+    wait(1);
+    a=1;b=0;c=0;d=1;
+    wait(1);
+    a=1;b=0;c=0;d=0;
+    wait(1);
+    a=0;b=1;c=1;d=1;
+    wait(1);
+    a=0;b=1;c=1;d=0;
+    wait(1);
+    a=0;b=1;c=0;d=1;
+    wait(1);
+    a=0;b=1;c=0;d=0;
+    wait(1);
+    a=0;b=0;c=1;d=1;
+    wait(1);
+    a=0;b=0;c=1;d=0;
+    wait(1);
+    a=0;b=0;c=0;d=1;
+    wait(1);
+    a=0;b=0;c=0;d=0;
+    wait(1);
+}
+
+int main() {
+    sw.rise(&down);  
+    a=0;b=0;c=0;d=1;
+    wait(1);
+    a=0;b=0;c=1;d=0;
+    wait(1);
+    a=0;b=0;c=1;d=1;
+    wait(1); 
+    a=0;b=1;c=0;d=0;
+    wait(1);
+    a=0;b=1;c=0;d=1;
+    wait(1);
+    a=0;b=1;c=1;d=0;
+    wait(1);
+    a=0;b=1;c=1;d=1;
+    wait(1);
+    a=1;b=0;c=0;d=0;
+    wait(1);
+    a=1;b=0;c=0;d=1;
+    wait(1);          
+    a=1;b=0;c=1;d=1;
+    wait(1);
+    a=1;b=0;c=1;d=1;
+    wait(1);
+    a=1;b=1;c=0;d=0;
+    wait(1);
+    a=1;b=1;c=0;d=1;
+    wait(1);
+    a=1;b=1;c=1;d=0;
+    wait(1);
+    a=1;b=1;c=1;d=1;
+    wait(1);    
+    
+        }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Jul 02 09:56:56 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7cff1c4259d7
\ No newline at end of file