if(u==10)
{
u=0;
flag++;
temp=read_AD(CH1)*2;//电阻分压过,值要乘2
if(temp<5590)//高于0度
{
LED=1;
temp=(temp-5590)/-40;
}
if(temp>5590)//低于0度
{
LED=0;
temp=(temp-5590)/40;
}
shi=temp%100/10; //取十位
ge=temp%10; //取个位
}
{
u=0;
flag++;
temp=read_AD(CH1)*2;//电阻分压过,值要乘2
if(temp<5590)//高于0度
{
LED=1;
temp=(temp-5590)/-40;
}
if(temp>5590)//低于0度
{
LED=0;
temp=(temp-5590)/40;
}
shi=temp%100/10; //取十位
ge=temp%10; //取个位
}