Sub programs of serial_transport, PID and motor contrl.
Dependents: tracking_ball_0516 tracking_ball_0516
Diff: MOTOR_CONTROL_CLASS.h
- Revision:
- 2:a668eb71516b
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/MOTOR_CONTROL_CLASS.h Mon May 24 08:56:23 2021 +0000 @@ -0,0 +1,18 @@ +#ifndef __MOTOR_CONTROL_CLASS_H__ +#define __MOTOR_CONTROL_CLASS_H__ +#include<mbed.h> + +class Motor_Control_Class{ +public: + Motor_Control_Class(PinName pin); + ~Motor_Control_Class(); + void Set_Para(double period,double plus_width); + void Set_Output(int value); +private: + double m_period; + double m_plus_width_ratio; + PwmOut * m_pwmout; + +}; + +#endif