freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

電動車蹺蹺板本科畢業(yè)設(shè)計論文(參考版)

2024-12-07 16:21本頁面
  

【正文】 endif 元件清單 序號 名稱、型號、規(guī)格 數(shù)量 23 1 MSP430(MSP430F22X4)系列單片機 1 2 直流電機 2 3 SCA100T、傾角傳感器 1 4 4N2 光電耦合器 4 5 ST18 紅外光電傳感器 4 6 L298N 1 7 1N414二極管 8 8 473 穩(wěn)壓二極管 1 9 共陰極 4位一體數(shù)碼管 1 10 510? 、 20K? 、 470? 電阻 9 11 電容 1 12 蜂鳴器 1 13 發(fā)光二極管 1 14 3V、 電池 6 。 void SendCommand(unsigned int Command)。 unsigned int GetAY(void)。 //函數(shù)說明 unsigned int AYFilter(void)。=~BIT1 define SetMOSI P4OUT |=BIT2 //MOSI接 define ClrMOSI P4OUTamp。 ******************************************************************************/ ifndef __QINGJIAO define __QINGJIAO include 22 define SetCSB P4OUT |=BIT0 //CSB接 define ClrCSB P4OUT amp。 return Average 。 Average = Average Max Min。i5。 if( Data[i] Min ) Min=Data[i]。i5。 Max=Min=Data[0]。i5。 unsigned int Data[5]。 return Average 。 Average = Average Max Min。i5。 if( Data[i] Min ) Min=Data[i]。i5。 Max=Min=Data[0]。i5。 unsigned int Data[5]。 ClrSCK。 SetSCK。 Bit = 1。 Bit) SetMOSI。i8。 } void SendCommand(unsigned int Command) // 作為 MOSI, 發(fā)送命令 { unsigned int i,Bit=0x80。 ClrSCK。 0x80 ) 20 Data |= 0x01。 Data = 1。i++) { Delay(TSCK)。 for(i=0。 return Data。 Data = ReceiveData()。 ClrCSB。 SetCSB。 ClrCSB。 } unsigned int GetAY(void) //獲得 Y軸傾角值 { unsigned int Data=0。 SetCSB。 SendCommand(RDAX)。 Delay(T150us)。 SendCommand(MEAS)。 Delay(TSCK)。time)。 endif 平衡測量與控制部分:“ “ include include void Delay(unsigned int time) //傾角延時 { for(。 extern xianshi_daojishi()。 void Balance()。 void BackForward()。 ******************************************************************************/ ifndef __MOTORCONTROL define __MOTORCONTROL include void GoForward()。=~BIT2。=~BIT3。pwm_count)。 for(pwm_count=8000。=~BIT3。 MotorDriveBack_Vcc_and_High 。pwm_loop0。 } } } void Stop() { unsigned int pwm_count,pwm_loop。 xianshi_daojishi()。pwm_time0。pwm_loop0。=~BIT1。=~BIT0。=~BIT3。=~BIT2。pwm_time)。xiaodou) //等待板平穩(wěn) for(pwm_time=60000。 for(xiaodou=15。 //電機先停止 P2OUT amp。 P2OUT amp。pwm_time0。 //電機正轉(zhuǎn)制動 P2OUT |=BIT2。 P2OUTamp。=~BIT0。pwm_time)。 for(pwm_time=40000。 //電機反轉(zhuǎn)后退 P2OUTamp。=~BIT1。=~BIT0。pwm_time)。xiaodou) //等待板平穩(wěn) for(pwm_time=60000。 17 for(xiaodou=15。 //電機先停止 P2OUT amp。 P2OUTamp。pwm_time0。 //電機反轉(zhuǎn)制動 P2OUT |=BIT3。 P2OUTamp。 //方向直流電機停止 P2OUT amp。pwm_time)。 for(pwm_time=40000。 //電機正轉(zhuǎn)前進 P2OUTamp。=~BIT1。=~BIT0。 while(1) { number= AYFilter()。=~BIT1。=~BIT0。pwm_count)。 for(pwm_count=60000。=~BIT2。pwm_count)。pwm_loop) for(pwm_count=60000。 for(pwm_loop=5。 P2OUT amp。=~BIT1。BIT6)==BIT6) //右方傳感器接 { P2OUT |=BIT0。pwm_count)。 for(pwm_count=60000。=~BIT2。pwm_count)。pwm_loop) for(pwm_count=60000。 for(pwm_loop=5。 P2OUT amp。=~BIT0。BIT5)==BIT5) //左方傳感器接 { P2OUT |=BIT1。BIT5)!=BIT5)||((P4INamp。pwm_count)。 for(pwm_count=13000。 //電機反轉(zhuǎn) P2OUTamp。pwm_count)。 for(pwm_count=10000。=~BIT3。 } */ } /***********************************小車倒退下坡 ******************************/ void BackSlowForward() { unsigned int pwm_count,pwm_loop。 //方向直流電機停止 P2OUT amp。 } } else //未偏離位置 { P2OUT amp。 //左邊偏離 ,向右轉(zhuǎn) P2OUT amp。 } if((P4INamp。 //右邊偏離 ,向左轉(zhuǎn) P2OUT amp。BIT6)!=BIT6)) //偏離位置 { if((P4INamp。 /*
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1