![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Teacher version
Dependencies: mbed lib_workshop_2019
Diff: src/test_motor/ft_run_motor.cpp
- Revision:
- 5:d99659a45cab
- Parent:
- 4:bf5caf4c0c88
--- a/src/test_motor/ft_run_motor.cpp Wed Oct 23 19:25:12 2019 +0000 +++ b/src/test_motor/ft_run_motor.cpp Thu Oct 24 03:54:20 2019 +0000 @@ -1,6 +1,13 @@ #include "mbed.h" #include "test_motor.h" +/**********************************************************************/ +/** ft_run_motor **/ +/* Args : - direction (e_direction): direction to turn the motor */ +/* - duty_cycle (double): duty cycle for the PWM */ +/* - pwm_mot (PwmOut): pin to set the PWM */ +/* - dirA and dirB (DigitalOut): Pins to set the direction */ +/**********************************************************************/ void ft_run_motor( e_direction direction, double duty_cycle, PwmOut pwm_mot, DigitalOut dirA, DigitalOut dirB) { @@ -18,5 +25,6 @@ dirB = 1; } + /* TO DO : apply duty cycle to pwm_mot */ pwm_mot = duty_cycle; }