if (humidity > HH) Led_qushi = 0; else Led_qushi = 1;
键盘查询,在弹起时响应
if ((Key_TH1)&&(keyTH1==0)) {FlagKeyPress = 1; keyvalue = 1;}
去湿
else if ((Key_TH2)&&(keyTH2==0)) {FlagKeyPress = 1; keyvalue = 2;} else if ((Key_HH1)&&(keyHH1==0)) {FlagKeyPress = 1; keyvalue = 3;} else if ((Key_HH2)&&(keyHH2==0)) {FlagKeyPress = 1; keyvalue = 4;}
if (FlagKeyPress == 1) {
KeyProcess(keyvalue); FlagKeyPress = 0; }
}
}
else keyTH1 = 1; else keyTH2 = 1; else keyHH1 = 1; else keyHH2 = 1;
if (!Key_TH1) keyTH1 = 0; if (!Key_TH2) keyTH2 = 0; if (!Key_HH1) keyHH1 = 0; if (!Key_HH2) keyHH2 = 0;