資源簡介
pid小車四個輪子的代碼,模板,做小車的同學可以參考,
代碼片段和文件信息
#include?
#include?“systick.h“
#include?“motor.h“
#include?“PID.h“
__IO?uint32_t?CaptureNumber1;
__IO?uint32_t?CaptureNumber2;
__IO?uint32_t?CaptureNumber3;
__IO?uint32_t?CaptureNumber4;
typedef?struct?
{
__IO?int??????SetPoint;?????????????????????????????????//設定目標?Desired?Value
__IO?double???Proportion;???????????????????????????????//比例常數?Proportional?Const
__IO?double???Integral;?????????????????????????????????//積分常數?Integral?Const
__IO?double???Derivative;???????????????????????????????//微分常數?Derivative?Const
__IO?int??????LastError1;????????????????????????????????//Error[-1]
__IO?int??????PrevError1;????????????????????????????????//Error[-2]
__IO?int??????LastError2;????????????????????????????????//Error[-1]
__IO?int??????PrevError2;?????
- 上一篇:chartControl
- 下一篇:editplus3中文
評論
共有 條評論