Pablo's TEAM LAB2 / Mbed 2 deprecated LAB2

Dependencies:   mbed

Revision:
0:db1b39babf83
Child:
1:1fb5ff2554ca
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Sep 20 19:20:10 2018 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+int main() {
+DigitalOut tony[5]={p26,p27,p28,p29,p30};
+ tony[p26]=0;
+ tony[p27]=0;
+ tony[p28]=1;
+ tony[p29]=0;
+ tony[p30]=0;
+ int x;
+ Digital sw1( 
+     while(1) {
+        if(sw1== 1 && sw2==1){
+        tony[x]=0;
+        x=2;
+        tony[x]=1;
+        }
+        
+        else if (sw1==1){
+        tony[x]=0;
+        if(x=4);
+        x++;}
+        tony[x]=1;
+        wait(0.5);
+        }
+        else if (sw2==1){
+        tony[x]=0;
+        if(x=0);
+        x--;}
+        tony[x]=1;
+        wait(0.5);
+        }
+    }
+}