飞思卡尔光电k60程序
很好的程序voidGetMotorPulse(void)//获取电机速度,并积分;
{
MotorPulse_R=-(short)FTM1_CNT;
MotorPulse_L=(short)FTM2_CNT;
FTM1_CNT=0;
FTM2_CNT=0;
//电机脉冲信号
CarSpeed=(MotorPulse_L+MotorPulse_R)/2;
MotorPulse_L=0;
下载地址
用户评论
循迹算法有一定参考价值。