电子设计报告
unsigned char i; while(y--); for(i=250;i>0;i--); }
void warn() {
uchar count;
for(count=200;count>0;count--) {
beep=~beep; delayy(2); LED=~LED;
}
}
/****************温度***********************/ void deal(uchar t) {
if(t>temph) {
Strplay(0xb9,0x02,0x00," A little hot! ");
cold=1;warn();}
else if(t<templ) {
Strplay(0xb9,0x02,0x00," A little cold!");
hot=0;warn();}
else }
{
beep=1;LED=1;cold=0;hot=1;
Strplay(0xb9,0x02,0x00," OK! ");}