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
Diff: main.cpp
- Revision:
- 8:5703dadaed07
- Parent:
- 7:ba0caeb296bb
- Child:
- 9:1636083fce43
--- a/main.cpp Wed Apr 20 14:23:51 2016 +0000 +++ b/main.cpp Tue Apr 26 11:03:23 2016 +0000 @@ -248,8 +248,8 @@ fart = 1000; //global_direction = '0'; step4Left1(); - step4Left2(); - step4Left3();t + //step4Left2(); + //step4Left3(); //steps = steps + step; @@ -262,8 +262,8 @@ fart = 1000; //global_direction = '1'; step4Right1(); - step4Right2(); - step4Right3(); + //step4Right2(); + // step4Right3(); } else { @@ -275,8 +275,8 @@ fart = 2000; //global_direction = '1'; step4Right1(); - step4Right2(); - step4Right3(); + //step4Right2(); + //step4Right3(); //steps = steps + step; // printf("%i", &steps); @@ -287,23 +287,23 @@ fart = 2000; //global_direction = '0'; step4Left1(); - step4Left2(); - step4Left3(); + //step4Left2(); + //step4Left3(); //steps = steps + step; // printf("%i", &steps); } else if (m_cmd == 'k') { - int steps = 242; + int steps = 50; //Steps = 242 gives a 60' rotation to the left. while (steps >= 0) { step4Left1(); - step4Left2(); - step4Left3(); + //step4Left2(); + //step4Left3(); steps--; } m_cmd = 'x'; @@ -315,8 +315,8 @@ while (steps >= 0) { step4Right1(); - step4Right2(); - step4Right3(); + //step4Right2(); + //step4Right3(); steps--; } m_cmd = 'x';