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:
- 11:ef54754100ea
- Parent:
- 10:17a16ceb376b
- Child:
- 12:de8381ca371d
--- a/main.cpp Tue Apr 26 13:10:22 2016 +0000 +++ b/main.cpp Tue Apr 26 13:28:52 2016 +0000 @@ -14,7 +14,7 @@ DigitalOut IN5(D3); DigitalOut IN6(D4); DigitalOut IN7(D5); -DigitalOut IN8(D6) +DigitalOut IN8(D6); /* //Third engine 9-12 DigitalOut IN9(D8); @@ -212,6 +212,17 @@ wait_us(fart); } +void motor2(void const *args) +{ + while(true) + { + if(m_cmd == 't') + { + step4Left2(); + } + } +} + void input(void const *args) { @@ -232,6 +243,7 @@ { //Thread 1 has constant feed from usb Thread t1(input); + Thread t2(motor2); static char global_direction; printf("Started");