motor running

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
chetanpatil
Date:
Wed Nov 25 11:17:36 2015 +0000
Commit message:
motor

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
diff -r 000000000000 -r 9f382047c8bd main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Nov 25 11:17:36 2015 +0000
@@ -0,0 +1,61 @@
+#include "mbed.h"
+BusOut e(p13.p14);
+BusOut s1(p8);
+BusOut s2(p9);
+//BusIn w(p5,p6);
+
+int main() 
+{
+    
+    while(1) 
+    {
+        e=1;
+        s1=1;
+        s2=2;
+        wait(1);
+    
+      /*if(w==0)
+       {
+          e=1;
+          s1=0;
+          wait(0.030);
+          s2=0;
+          wait(0.030);
+          
+        }
+        if(w==1)
+        {
+            e=1;
+            s1=1;
+            wait(0.020);
+          s2=0;
+          wait(0.020);
+          
+          }
+        if(w==2)
+        {
+            e=1;
+            s1=1;
+            wait(0.5);
+          s2=0;
+          wait(0.5);
+          
+          }
+          if(w==3)
+          {
+            e=1;
+            s1=1;
+            wait(1);
+          s2=0;
+          wait(1);                
+          }  
+         else
+          {
+              e=1;
+              s1=1;
+              wait(0.03);
+              s1=0;
+               wait(0.03);
+              }*/
+    }
+}
diff -r 000000000000 -r 9f382047c8bd mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Nov 25 11:17:36 2015 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/4f6c30876dfa
\ No newline at end of file