仓库温湿度检测系统设计与实现 - 图文

2026/1/27 7:36:24

if(num==1) {

if(k2==0) { delayms(10); if(k2==0) { th++; if(th==100) th=25; while(!k2); } }

if(k3==0) { delayms(10); if(k3==0) { th--; if(th==0) th=25; while(!k3); } } }

/***********设置下限温度********/ if(num==2) {

if(k2==0) {

delayms(10); if(k2==0) {

low++; if(low==40) low=15; while(!k2); } }

if(k3==0) {

delayms(10); if(k3==0)

22

{ low--; if(low==0) low=15; while(!k3); } } }

/******设置上限湿度******/ if(num==4) {

if(k2==0) { delayms(10); if(k2==0) { sth++; if(sth==100) sth=70; while(!k2); } }

if(k3==0) { delayms(10); if(k3==0) { sth--; if(sth==0) sth=70; while(!k3); } } }

/*******设置下限湿度*******/ if(num==5) {

if(k2==0) {

delayms(10); if(k2==0) {

sl++; if(sl==60) sl=30;

23

while(!k2); } } if(k3==0) { delayms(10); if(k3==0) { sl--; if(sl==0) sl=30; while(!k3); } } } } }

/*******显示当前温度*****/ void display1() { a=temp1/10; b=temp1; P2=0xbf; P0=0xc6; delayms(10); P2=0xef; P0=led[a]; delayms(10); P2=0xf7; P0=led[b]; delayms(10); }

/*******设置上限温度******/ void display2() { uchar c,d; c=th/10; d=th; P2=0xbf; P0=0x89;

24

delayms(10); P2=0xef; P0=led[c]; delayms(10); P2=0xf7; P0=led[d]; delayms(10); }

/*****设置温度下限*******/ void display3() { uchar e,f; e=low/10; f=low; P2=0xbf; P0=0xc7; delayms(10); P2=0xef; P0=led[e]; delayms(10); P2=0xf7; P0=led[f]; delayms(10); }

/*******温度超过或低于设定值报警******/ void sound() { if(temp1th) //判断是否超过设定值 { BEEP(); //超过设定值报警 if(temp1th) { RELAY=0; } } }

/***********湿度超出设定值报警************/

25


仓库温湿度检测系统设计与实现 - 图文.doc 将本文的Word文档下载到电脑
搜索更多关于: 仓库温湿度检测系统设计与实现 - 图文 的文档
相关推荐
相关阅读
× 游客快捷下载通道(下载后可以自由复制和排版)

下载本文档需要支付 10

支付方式:

开通VIP包月会员 特价:29元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:xuecool-com QQ:370150219