PID控制电机
PID控制电机
#include"msp430x54xA.h"
#include"public.h"
longintnum0=0,num1=0,speed=0;
intError,Error1,Error2;
externucharPoint_Speed;
/*=====================初始化PID==================*/
voidInit_PID(ucharpwm,uintspeed0)
{
while(1)
{
keyscan();
PWM(pwm,100-pwm);
用户评论
zxwsjtu80116 2020-06-01 18:50:33
比较简单的PID控制.
jiu_yexue 2020-06-01 18:50:33
一般吧,关于PID的