dangerous spin things

Dependencies:   Motor mbed

Files at this revision

API Documentation at this revision

Comitter:
tsevcik08
Date:
Thu Oct 16 17:38:14 2014 +0000
Parent:
0:fa52c6fc593f
Commit message:
dc motor

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r fa52c6fc593f -r 90b569aa2335 main.cpp
--- a/main.cpp	Thu Oct 09 19:08:54 2014 +0000
+++ b/main.cpp	Thu Oct 16 17:38:14 2014 +0000
@@ -21,5 +21,25 @@
             mspeed = 0.0;
             kate.speed(mspeed);
         }
+        else if(( sw2 == 1 && sw3 == 1)){ 
+            mspeed = 0.0;
+            kate.speed(mspeed);
+            }
+        if( sw3 == 1 ) {
+            mspeed = -0.35;
+            kate.speed(mspeed);
+            wait(.03);
+            mspeed = 0.0;
+            kate.speed(mspeed);
+            wait(.05);
+            
+        } else if (sw3 == 0) {
+            mspeed = 0.0;
+            kate.speed(mspeed);
+        }
+        else if(( sw2 == 1 && sw3 == 1)){ 
+            mspeed = 0.0;
+            kate.speed(mspeed);
+        }
     }
 }
\ No newline at end of file