Library version for DC_Stepper_Controller_Lib with PWM speed control

Dependencies:   mbed QEI PID

Dependents:   DR-ArmServoTest Auto_DC_pick_class MBed_TR1 ros_button_2021

Committer:
stivending
Date:
Mon May 24 08:19:58 2021 +0000
Revision:
8:703502486434
Parent:
7:6e59ed00a6a9
Child:
9:49b59b308767
optimize comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cheukming0607 2:6bc435f4ffec 1 #include "mbed.h"
aberk 0:bcff39fac858 2 #include "QEI.h"
stivending 5:c040faf21e07 3 #include "DC_Motor_Controller.h"
aberk 0:bcff39fac858 4
stivending 8:703502486434 5 DC_Motor_Controller motor(D2,D3,D4,D5,792); //IN1(M1), IN2(M2), INA, INB, PPR
stivending 4:b242191ed0cf 6
stivending 7:6e59ed00a6a9 7 int main() {
stivending 7:6e59ed00a6a9 8
stivending 5:c040faf21e07 9 motor.reset();
stivending 7:6e59ed00a6a9 10 /*
stivending 7:6e59ed00a6a9 11 motor.set_out(1,0);
stivending 7:6e59ed00a6a9 12 wait(5);
stivending 7:6e59ed00a6a9 13 motor.set_out(0,1);
stivending 7:6e59ed00a6a9 14 wait(5);*/
stivending 7:6e59ed00a6a9 15
stivending 7:6e59ed00a6a9 16
stivending 7:6e59ed00a6a9 17 motor.move_angle(-180);
stivending 7:6e59ed00a6a9 18
stivending 7:6e59ed00a6a9 19 wait(3);
stivending 7:6e59ed00a6a9 20
stivending 7:6e59ed00a6a9 21 motor.reset();
cheukming0607 2:6bc435f4ffec 22 }