Library version for DC_Stepper_Controller_Lib with PWM speed control
Dependents: DR-ArmServoTest Auto_DC_pick_class MBed_TR1 ros_button_2021
Diff: main.cpp
- Revision:
- 9:49b59b308767
- Parent:
- 8:703502486434
- Child:
- 10:fe56f6800a72
--- a/main.cpp Mon May 24 08:19:58 2021 +0000 +++ b/main.cpp Tue May 25 06:17:55 2021 +0000 @@ -2,10 +2,13 @@ #include "QEI.h" #include "DC_Motor_Controller.h" + DC_Motor_Controller motor(D2,D3,D4,D5,792); //IN1(M1), IN2(M2), INA, INB, PPR + + int main() { - + motor.reset(); /* motor.set_out(1,0); @@ -14,9 +17,9 @@ wait(5);*/ - motor.move_angle(-180); + motor.move_angle(180); - wait(3); + wait(1); - motor.reset(); + motor.move_angle(-180); } \ No newline at end of file