abledu[shi+10];dula=0;Pl=Oxff;〃消段码影wela=l;Pl=tablewe[6];delay(l);Pl=Oxff;〃消位码wela=0;dula=l;〃显示个位Pl=tabledu[ge];dula=0;Pl=Oxff;〃消段码影wela=l;Pl=tablewe[7];delay(l);Pl=Oxff;〃消位码wela=0;}voidmain(){init();//初始化while(l){if(!flag)〃扫描函数标志是否置位{get_temp();〃温度湿度采集if((tempvalue>tempH)|(tempvalue<tempL)|(humidity>humiH)|(humidity<humiL))//温度湿度是否超过范圉beep=1;if(tempvalue>tempH){FS=O;DL=1;}if(tempvalue<tempL){FS=1;DL=O;}if(humidity>humiH){FJ=O;PWJ=1;}if(humidity<humiL){FJ=1;PWJ=O;}}elsebeep=O;if(tempvalue>settemp){FS=O;DL=1;}if(tempvalue==settemp){FS=1;DL=1;}if(tempvalue<settemp){FS=1;DL=O;}if(humidity>sethumi){FJ=O;PWJ=1;}if(humidity==sethumi){FJ=1;PWJ=1;}if(humidity<sethumi){FJ=1;PWJ=O;}}elsekeyscan();〃键盘扫描voidinter(void)intenupt0?〃外部中断函数EX0=0;〃关INTOmod_flag二〜mod_flag;〃模式切换标志flag=l;〃扫描键盘函数标志置位EXO=1;〃开INTO