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

正文內(nèi)容

單片機課程設(shè)計-基于gsm的智能家居系統(tǒng)(文件)

2024-12-04 17:23 上一頁面

下一頁面
 

【正文】 //如果單片機沒有收到 OK,就繼續(xù)發(fā)送初始化指令 / for(Rx=0。 } else { //beep=0。 } Rx=0。 if((SystemBuf[5]==0x54)amp。iRx。實現(xiàn)功能 :判斷短信 ,準(zhǔn)備是否回復(fù)短信給目標(biāo)號碼 ////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /******************************************************************************************************************/ void message_read(void) { if((sendready==1)amp。(SystemBuf[6]==0x52)) //GR send=1。 for(i=0。i8。i++) { AT_Read[i]=numberbuf[i8]。 } Rx=0。 Delay_ms(1000)。i8。i++) { AT_delete[i]=numberbuf[i8]。 } Rx=0。 for(i=0。i24。 if(flag==0) { //if(check==1) //{ // sendstring(state)。 } Delay_ms(30)。 for(i=0。amp。 // check=1。 break。 case 0x34: // check=1。 default:flag=1。(CommandBuf[6]==39。 case 0x32: relay_2=1。 case 0x34: break。 //置位錯誤操作位為 1 } } else {flag=1。i++) { if(CommandBuf[i]==password[i]) k++。 for(i=0。i24。 sendstring(danger)。 uchar passwordx[6]={39。,39。,39。}。 //清觸發(fā)器 isp_addrh=0x00。 EA=0。 //設(shè)時間與充 ISP 操作。 //觸發(fā)啟動。 //延時 iap_disable()。 } /*=========================編程數(shù)據(jù) =====================*/ void e2_write(uint addres,uchar write_data)//寫數(shù)據(jù)。 //要寫入的數(shù)據(jù)。 //設(shè)時間與充 ISP 操作 isp_cmd=0x02。i6。 //關(guān) IAP 功能 } /*=========================擦除扇區(qū) ======================*/ void e2_erasure (uint addres) //扇區(qū)擦除。 //高位地址 isp_contr=0x80。 //觸發(fā) isp_trig=0xb9。 } /*=========================存儲讀取 ======================*/ //State=1 存儲 數(shù)據(jù)、為 0 則讀取數(shù)據(jù)并返回 。 } else { num= e2_read(addres)。i6。 } } /////////////////讀出 EEPROM 中的密碼 /////////////////// void Read_Password(void) { uchar i。 if(State==1) { e2_erasure(addres)。 iap_disable()。 isp_cmd=0x03。 isp_addrl=addres%0x100。 //延時 徐州師范大學(xué)物理與電子工程學(xué)院課程設(shè)計報告 24 EA=1。 //觸發(fā) isp_trig=0xb9。 //低位地址 isp_addrh=addres/0x100。 EA=0。 //把數(shù)據(jù)送到 Z 并返回 EA=1。i6。 //寫命令 isp_trig=0x46。 //低位地址 isp_addrh=addres/0x100。 } /*=========================讀數(shù)據(jù) ======================*/ uchar e2_read(uint addres) { uchar i=0。 //關(guān) IAP 功能 isp_cmd =0x00。,39。,39。,39。 sendchar(0X1A)。 //將對方號碼提取用來回復(fù)給對方 } sendstring(AT_SendNumber)。i++) { AT_SendNumber[i]=AT_CMGS[i]。 return 1。 for(i=0。 default:flag=1。 case 0x33: relay_3=1。)) //判斷指令是否為關(guān)閉電器指令 { switch(CommandBuf[7]) { case 0x31: relay_1=1。 //置位錯誤操作位為 1 徐州師范大學(xué)物理與電子工程學(xué)院課程設(shè)計報告 21 } } else { if(Compare()amp。 case 0x35: case 0x36: case 0x37: case 0x38: case 0x41: case 0x42: case 0x43: case 0x44: case 0x45: case 0x46: case 0x47: case 0x48: case 0x3f: // check=1。 // check=1。 case 0x32: relay_2=0。k39。i++) // 將短信內(nèi)容中的指令部分截取出來放到 { //CommandBuf 數(shù)組中 CommandBuf[i]=SystemBuf[64+i]。 } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////函數(shù) void readmend(void)。 // check=0。 //將對方號碼提取用來回復(fù)給對方 } sendstring(AT_SendNumber)。i++) { AT_SendNumber[i]=AT_CMGS[i]。 //發(fā)送 AT+CMGR=?,?代表短信儲存所在位置 } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////// 函數(shù) void sendmessage(void)。RxRxIn。 } for(i=8。 Delay_ms(5000)。 //發(fā)送 AT+CMGR=?,?代表短信儲存所在位置 } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /////////////////// 函數(shù) void delete_message。RxRxIn。 } for(i=8。i++) { numberbuf[i]=SystemBuf[14+i]。 實 現(xiàn) 功 能 : 發(fā) 送 讀 取 短 信 指令 ,//////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// /******************************************************************************************************************/ void read_message(void) { uchar i。(SystemBuf[5]==0x47)amp。 } 徐州師范大學(xué)物理與電子工程學(xué)院課程設(shè)計報告 17 Rx=0。SystemBuf[6]==0x49) //如果有新短信 (TI)來 ,模塊會通過串口向單片機發(fā)送字符串 , { // 此函數(shù)的功能是判斷是否有新短信來 ,如果來的話就置位準(zhǔn)備接受位標(biāo)志為 1 receiveready=1。 } } /******************************************************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////函數(shù) void receive_ready(void)。RxRxIn。Rx++) { SystemBuf[Rx]=0x00。K39。O39。 } Rx=0。 Delay_ms(1000)。 Delay_ms(1000)。實現(xiàn)功能 :初始化
點擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1