Engine control program with 3 engines Needs to make a case for each simultaneous engine setting, because of the WAIT after each number of bits have been sent.

Dependencies:   mbed-rtos mbed PinDetect

Fork of FinalMotorControl by Robot Bachelor

Revision:
14:c3d1689dccf8
Parent:
13:9aa772ae6057
Child:
15:d9c9ae9e5fc2
--- a/main.cpp	Tue Apr 26 13:43:03 2016 +0000
+++ b/main.cpp	Tue Apr 26 13:47:02 2016 +0000
@@ -212,16 +212,6 @@
     wait_us(fart);
 }
 
-void motor2(void const *args)
-{
-    while(true)
-    {
-        if(m_cmd == 't')
-        {
-            step4Left2();
-        }
-    }
-}
 
   
 void input(void const *args)
@@ -243,7 +233,7 @@
 {
         //Thread 1 has constant feed from usb
         Thread t1(input);
-        Thread t2(motor2);
+
         static char global_direction;
         printf("Started");
         
@@ -256,6 +246,7 @@
             
             {
                 step4Left1();
+                step4Left2();
             }
             
             //0 STEPS LEFT AT MAX SPEED
@@ -264,6 +255,7 @@
                 fart = 1000;
                 //global_direction = '0';
                 step4Left1();
+                step4Left2();
                 //step4Left2();
                 //step4Left3();
                 //steps = steps + step;