电路图没啥问题,程序难倒我了
if((yanwu>=Gas_H)||(hongw==1)||(wendu/100>=temp_H)) { value1 ++; //消除实际数据在设定数据左右变化时的干扰 if(value1 > 80)//??? { BUZZER=0;//蜂鸣器响 } } else BUZZER=1; if(bTime_40S == 1)//bttime??? { bTime_40S=0; if(hongw==1) Send_Message1(); else if(yanwu>=Gas_H) Send_Message3(); else if(wendu/100>=temp_H) Send_Message2(); } if(Mode==0 && Mode_flag)//MODE或mode_flag是否为0 { WriteCOMDATA(0x0F,0); Delay(20);//延时防抖 if(Mode==0)//再确认 { BUZZER=1; Mode_flag=0; shezhi_flag=1; //设置显示页面 n=1;//??? while(1) { /***********/ if(Mode==0) { Delay(300); while(Mode==0) { Delay(300); Mode_count++; if(Mode_count>6) { WriteCOMDATA(0x0C,0); Delay(100); WriteChar(1,0,16," Burglar alarm "); //在第一行显示内容 WriteChar(2,0,16,disp); //在第二行显示内容 } } if(Mode_count>6)//?? { Mode_count=0;//??? break; } else Mode_count=0; shezhi_flag++; if(shezhi_flag>2)shezhi_flag=1;//??? } } } }
|