巡线小车源程序(MSP430-PID).docVIP

  • 66
  • 0
  • 约1.72千字
  • 约 3页
  • 2021-10-28 发布于湖南
  • 举报
巡线小车源程序(MSP430-PID) 巡线小车源程序(MSP430-PID) PAGE 巡线小车源程序(MSP430-PID) 巡线小车源程序(MSP430,PID) 首先是各种宏定义的头文件 [cpp]view plaincopy #ifndef xxxx_xxx #define xxxx_xxx #define P 43 #define I #define D 100 #define LeftMotorTurnNeg {P3OUT|=BIT0;P3OUT=~BIT1;} #define LeftMotorTurnPos {P3OUT=~BIT0;P3OUT|=BIT1;} #define RightMotorTurnNeg {P3OUT|=BIT3;P3OUT=~BIT2;} #define RightMotorTurnPos {P3OUT=~BIT3;P3OUT|=BIT2;} #define LeftPwmOut TACCR1 #define RightPwmOut TACCR2 #define F 10000 #define T (8000000/F) #define BASIC 100 #define simpletime (unsigned

文档评论(0)

1亿VIP精品文档

相关文档