Testing 1 blue pill
Dependencies: mbed mbed-rtos TextLCD
Diff: Stepper_Motor/STEPPER_MOTOR.cpp
- Revision:
- 28:3193157ebb0c
- Parent:
- 25:9751619fa030
- Child:
- 29:f3b1387c81f1
--- a/Stepper_Motor/STEPPER_MOTOR.cpp Fri Mar 01 21:57:59 2019 +0000 +++ b/Stepper_Motor/STEPPER_MOTOR.cpp Mon Mar 11 14:19:26 2019 +0000 @@ -1,6 +1,6 @@ #include "mbed.h" //Include the mbed libraries #include "STEPPER_MOTOR.hpp" //Include the header file, this acts like a series of forward declarations - +int loop_wait_time = 0; //Constructor STEPPER_MOTOR::STEPPER_MOTOR(PinName N1, PinName N2, PinName N3, PinName N4) : pin1(N1),pin2(N2),pin3(N3),pin4(N4) { @@ -24,13 +24,13 @@ } void STEPPER_MOTOR::Rotate_Steps(int Steps,int Function) { - if(Function == 2) + if(Function == 2)//Coiling { - loop_wait_time = 1; + loop_wait_time = 2; } else if(Function == 3) { - loop_wait_time = 2; + loop_wait_time = 2;//Twisting } Steps = Steps*50; //int correctionfactor;