Sub programs of serial_transport, PID and motor contrl.

Dependents:   tracking_ball_0516 tracking_ball_0516

Committer:
helenh
Date:
Mon May 24 08:56:23 2021 +0000
Revision:
2:a668eb71516b
For sharing

Who changed what in which revision?

UserRevisionLine numberNew contents of line
helenh 2:a668eb71516b 1 #ifndef __MOTOR_CONTROL_CLASS_H__
helenh 2:a668eb71516b 2 #define __MOTOR_CONTROL_CLASS_H__
helenh 2:a668eb71516b 3 #include<mbed.h>
helenh 2:a668eb71516b 4
helenh 2:a668eb71516b 5 class Motor_Control_Class{
helenh 2:a668eb71516b 6 public:
helenh 2:a668eb71516b 7 Motor_Control_Class(PinName pin);
helenh 2:a668eb71516b 8 ~Motor_Control_Class();
helenh 2:a668eb71516b 9 void Set_Para(double period,double plus_width);
helenh 2:a668eb71516b 10 void Set_Output(int value);
helenh 2:a668eb71516b 11 private:
helenh 2:a668eb71516b 12 double m_period;
helenh 2:a668eb71516b 13 double m_plus_width_ratio;
helenh 2:a668eb71516b 14 PwmOut * m_pwmout;
helenh 2:a668eb71516b 15
helenh 2:a668eb71516b 16 };
helenh 2:a668eb71516b 17
helenh 2:a668eb71516b 18 #endif