![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Tuk tutoriail
Dependencies: mbed lib_workshop_2019
src/test_motor/ft_run_motor.cpp
- Committer:
- gvaquette
- Date:
- 2019-10-24
- Revision:
- 7:c7ff04228b11
- Parent:
- 5:d99659a45cab
- Child:
- 9:19255172362f
File content as of revision 7:c7ff04228b11:
#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) { /* TO DO : define direction */ if (direction == FORWARD) { } else // direction == BACKWARD { } /* TO DO : apply duty cycle to pwm_mot */ }