![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
Diff: actuator/DCmotor.hpp
- Revision:
- 2:e7b09385d197
diff -r 744e1f66d5dc -r e7b09385d197 actuator/DCmotor.hpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/actuator/DCmotor.hpp Sun Mar 27 04:39:16 2022 +0000 @@ -0,0 +1,16 @@ +#pragma once +#include<mbed.h> +#include<portSet.hpp> + +class DCmotor +{ +public: + DCmotor(Port motor, float max_pwm, float min_pwm, bool CW_flag); + DCmotor(PinName pin_a, PinName pin_b, float max_pwm, float min_pwm, bool CW_flag); + void drive(float pwm); +private: + Port motor_; + float max_pwm_; + float min_pwm_; + bool CW_flag_; +}; \ No newline at end of file