![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Library version for DC_Stepper_Controller_Lib with PWM speed control
Dependents: DR-ArmServoTest Auto_DC_pick_class MBed_TR1 ros_button_2021
main.cpp
- Committer:
- stivending
- Date:
- 2021-05-25
- Revision:
- 10:fe56f6800a72
- Parent:
- 9:49b59b308767
File content as of revision 10:fe56f6800a72:
#include "mbed.h" #include "QEI.h" #include "DC_Motor_Controller.h" DC_Motor_Controller motor(D6,D3,D4,D5,792); //M1, M2, INA, INB, PPR int main() { motor.reset(); /* motor.set_out(1,0); wait(5); motor.set_out(0,1); wait(5);*/ motor.move_angle(-90, 0.5); // speed, 0 to 1 wait(1.5); motor.move_angle(90, 0.3); wait(1.5); motor.goto_angle(0, 0.1); }