![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
my new gear...
actuator/DCmotor.hpp
- Committer:
- yootee
- Date:
- 2022-03-27
- Revision:
- 2:e7b09385d197
File content as of revision 2:e7b09385d197:
#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_; };