基于51单片机和Labview的家庭烟雾和温度报警系统

合集下载

基于51单片机的智能烟雾报警系统的设计

基于51单片机的智能烟雾报警系统的设计

基于51单片机的智能烟雾报警系统的设计AbstractThe intelligent smoke alarm system based on 51 single-chip microcomputer is designed to reduce the risk of fire accidents caused by human negligence. This system uses a smoke sensor, a temperature sensor, a buzzer and a display module to detect and alarm in the occurrence of smoke and high temperature. The design of the entire system is controlled by the 51 single-chip microcomputer. The paper discusses the design and implementation of the system, the algorithm for information processing, the choice of material and the hardware structure. The system has high reliability and good practicability, and can effectively improve the safety factor of the living environment.IntroductionIn recent years, with the increase in housing density and the use of electrical appliances, the frequency of fire incidents has gradually increased. The smoke caused by fireis the main cause of death and injury, and it is difficult to detect by human senses. Therefore, the development of intelligent smoke alarm system is of great significance to improve the safety factor of the living environment.This paper designs an intelligent smoke alarm system based on 51 single-chip microcomputer, which can detect smoke and high temperature and accurately alarm. This system is composed of a smoke sensor, a temperature sensor, a buzzer and a display module. The entire system is controlled by 51 single-chip microcomputer, which has strong practicality andreliability.Design and ImplementationHardware designThe smart smoke alarm system is mainly composed of four parts: a smoke sensor, a temperature sensor, a buzzer and a display module. The smoke sensor and the temperature sensor are set on the same PCB board, and the buzzer and the display module are set on another PCB board.The smoke sensor is used to detect the smoke concentration in the environment. When the smoke concentration exceeds the threshold, the output signal of the smoke sensor is sent to the 51 single-chip microcomputer. The temperature sensor is used to detect the ambient temperature changes, and when the temperature exceeds the threshold, the temperature sensor sends an output signal to the 51 single-chip microcomputer. The buzzer is used to output the alarm sound, and the display module is used to display the alarm information.Software designThe software design of the intelligent smoke alarm system includes information processing algorithm design,error handling design and system control design. The information processing algorithm includes smoke detection and temperature detection. When the smoke concentration or temperature exceeds the threshold, the system will start the alarm sound and display the alarm information on the display module. The error handling design mainly includes fault detection and fault alarm. When the system fails, the buzzer will alarm and display the error information on the display module. The system control design includes system startup, control and shutdown.Material SelectionThe main materials used in the smart smoke alarm system include the 51 single-chip microcomputer, PCB board, smoke sensor, temperature sensor, buzzer and display module. Inorder to ensure the stability and reliability of the system, high-quality and reliable raw materials need to be selected.The chosen smoke sensor is a high-sensitivity and high-precision smoke sensor, which can accurately detect changesin smoke concentration. The temperature sensor is athermistor type temperature sensor, which can accuratelydetect the ambient temperature changes. The buzzer is a high-decibel buzzer, which can output loud alarm sound. Thedisplay module is a 16x2 LCD display module, which candisplay alarm information.ConclusionIn this paper, a smart smoke alarm system based on 51 single-chip microcomputer is designed and implemented. The system can monitor the smoke concentration and temperature changes in the environment, and give an accurate alarm signal. The system uses high-quality raw materials and has high reliability and good practicability. The intelligent smoke alarm system can effectively improve the safety factor of the living environment, and is of practical value in the field of fire safety.。

基于labview的烟雾报警系统

基于labview的烟雾报警系统

基于labview的烟雾报警系统器材:计算机(装有labview)SL-1 型单片机开发试验箱一个、MQ-2 气体模块一个、ADC0809 芯片。

实现功能:通过上位机实时监测气体浓度,并与上位机设定的报警阀值比较,若超过气体浓度报警值,则上下位机同时报警。

实时改变气体报警值,通过上位机传给下位机判断。

电路原理图:参见ADC0809datasheet 和MQ-2 气体传感器模块参数。

传感器根据气体浓度输出0~5V 模拟电压输入到0809 的模拟输入端。

调式:通过串口调试助手检测数据传送的正确性。

程序:#include#include#include#define uchar unsigned char#define uint unsigned intsbit CLK=P3; //时钟输出sbit ST=P2; //启动转换输入信号sbit OE=P2;//允许输出信号sbit EOC=P3 ; //使用中断,则比T0 中断优先级低uchar DATA; //存放A/D 转换数据sbit Beep=P2;uchar aa;void delayxms(uint x) //延时{for(i=x;i>0;i--)for(j=110;j>0;j--);}void delayxus(uint x) //延时xus{uint i;for(i=x;i>0;i--)_nop_();}void init(void){TMOD=0x22; //定时器0 自动重装8 位,用于产生CLK,定时器1 设置串口参数TH0=237; //50kHZTL0=237;TL1=0xf3;TH1=0xf3;//2400bpsTR1=1;TR0=1;SM0=0;SM1=1;EA=1;ET0=1;ES=1;ST=0;OE=0;}void ADC0809(){ST=0;OE=0;//LE=1;P0=0x00;LE=0; //选择通道delayxus(2);ST=1; //启动AD 转换delayxus(10);ST=0;delayxus(200);while(EOC==0); //查询EOC=1 时,转换完毕OE=1;DATA=P1;//DATA 为AD 转换后的数据delayxus(20);OE=0;}tips:感谢大家的阅读,本文由我司收集整编。

基于单片机的远程烟雾报警系统

基于单片机的远程烟雾报警系统

基于单片机的远程烟雾报警系统一、本文概述随着科技的发展和人们生活水平的提高,智能家居和智能安全系统已成为现代生活中不可或缺的一部分。

其中,烟雾报警系统作为预防火灾的重要设备,在家庭、工厂、学校等场所中发挥着至关重要的作用。

传统的烟雾报警系统大多依赖本地报警,即在烟雾超标时,仅能在现场发出警报,无法及时通知远离现场的人员。

因此,开发一种基于单片机的远程烟雾报警系统,以实现远程监控和报警功能,具有重要的现实意义和应用价值。

本文旨在设计并实现一种基于单片机的远程烟雾报警系统。

该系统采用单片机作为核心控制器,通过烟雾传感器实时监测环境中的烟雾浓度,当烟雾浓度超过预设阈值时,系统不仅会在现场发出声光报警,还会通过无线通信技术将报警信息发送到远程用户手中,从而实现远程报警的功能。

本文将详细介绍该系统的硬件设计、软件编程、系统测试以及实际应用效果,以期为相关领域的研究和应用提供参考和借鉴。

二、系统概述随着现代科技的发展和人们生活水平的提高,对于生活环境的安全性要求也日益提高。

烟雾报警系统作为预防火灾的重要手段,其重要性不言而喻。

传统的烟雾报警系统大多采用有线连接方式,安装布线复杂,且扩展和维护困难。

因此,开发一种基于单片机的远程烟雾报警系统,既能实现烟雾检测报警,又能通过无线传输方式实现远程监控,具有重要的现实意义和应用价值。

本系统主要由烟雾传感器、单片机、无线通信模块等部分组成。

烟雾传感器负责实时监测环境中的烟雾浓度,一旦检测到烟雾浓度超过预设阈值,便会向单片机发送报警信号。

单片机作为系统的核心控制部件,负责接收传感器的报警信号,并通过无线通信模块将报警信息发送至远程监控中心。

监控中心收到报警信息后,可立即采取相应的处理措施,如通知消防部门或启动自动灭火系统等,从而实现对火灾的有效防控。

本系统具有安装简便、扩展性强、维护方便等优点。

通过引入无线通信技术,实现了对烟雾报警系统的远程监控和管理,提高了系统的智能化水平和响应速度。

基于51单片机的温度报警系统设计

基于51单片机的温度报警系统设计

基于51单片机的温度报警系统设计温度报警系统是一种常见的安全监控系统,它可以监测环境温度,并在温度达到设定阈值时发出警报。

本文将介绍一个基于51单片机的温度报警系统的设计。

一、系统设计目标和功能本系统的设计目标是实时监测环境温度,并在温度达到预设阈值时发出警报。

具体功能包括:1.温度采集:通过温度传感器实时采集环境温度。

2.温度显示:将采集到的温度值通过数码管显示出来。

3.温度比较:将采集到的温度值与预设的阈值进行比较。

4.报警控制:当温度超过预设的阈值时,触发警报控制器。

5.报警指示:通过蜂鸣器或者LED灯等方式进行报警提示。

二、硬件设计本系统的硬件设计包括主控部分和外围部分。

1. 主控部分:使用51单片机作为主控芯片,通过AD转换器和温度传感器实现温度数据采集。

采用片内RAM和Flash存储器对数据进行处理和存储。

2.外围部分:包括数码管显示和报警指示。

使用数码管模块将温度值进行显示,使用LED灯或者蜂鸣器进行报警指示。

三、软件设计本系统的软件设计包括程序的编写和算法的设计。

1.程序编写:使用C语言编写单片机的程序。

程序主要包括温度采集、温度比较、报警控制和报警指示等功能。

2.算法设计:根据采集到的温度值与预设阈值进行比较,判断是否触发警报控制器。

同时,根据警报控制器的状态,控制报警指示的开关。

四、系统测试完成硬件和软件设计后,需要进行系统测试以验证系统的正确性和稳定性。

1.硬件测试:对硬件电路进行测试,包括电源、信号传输和外围器件等方面。

测试时需要注意电源的稳定性,信号的准确性和外围部件的工作状态。

2.软件测试:进行程序的运行测试,检查各功能是否正常运行。

特别关注温度采集和比较、报警控制和报警指示等功能。

五、系统性能分析对系统的性能进行分析,包括温度采集的准确性、报警控制的响应时间和报警指示的稳定性等方面。

1.温度采集准确性:主要受温度传感器的精度和ADC转换的准确性影响。

在设计中要选择合适的传感器和ADC。

基于51单片机的温度检测报警系统

基于51单片机的温度检测报警系统

基于51单片机的温度检测报警系统摘要本文介绍了一种基于51单片机的温度检测报警系统的设计方案。

该系统能够实时检测环境温度,并在温度超出设定范围时触发报警器进行报警,从而实现对环境温度的监测和控制。

本文将主要涉及系统的硬件设计、软件设计和实现过程。

系统硬件设计本系统所需的核心硬件有:51单片机、温度传感器DS18B20、LED指示器和蜂鸣器,其中51单片机作为系统的控制中心,主要负责对温度传感器进行采集并触发LED指示器和蜂鸣器进行报警处理。

系统硬件电路图如下:TODO: 插入电路图其中,温度传感器DS18B20通过单总线协议连接到51单片机的P1.0引脚。

P1.1引脚连接到LED指示器,P1.2引脚连接到蜂鸣器。

系统软件设计本系统的软件设计主要分为两部分:主程序和温度采集程序。

主程序包括了系统的初始化、温度检测、温度报警、LED指示器和蜂鸣器控制等模块。

温度采集程序则是通过调用DS18B20的寄存器读写命令从传感器读取温度。

具体实现过程如下:主程序TODO: 插入代码主程序包含以下模块:1.系统初始化:配置P1.0引脚为输入模式,P1.1和P1.2引脚为输出模式。

2.温度检测:调用温度采集程序获取当前温度值,并判断是否超出指定范围。

3.温度报警:如果温度超出指定范围,则触发LED指示器和蜂鸣器进行报警处理。

4.LED指示器控制:根据温度超出指定范围的状态,对LED指示器进行开关控制。

5.蜂鸣器控制:根据温度超出指定范围的状态,对蜂鸣器进行开关控制。

温度采集程序TODO: 插入代码温度采集程序包含以下功能:1.向DS18B20发送获取温度命令。

2.从DS18B20读取温度数值。

3.根据读取到的值计算温度并返回。

系统实现过程本系统的实现过程包括系统硬件的组装和系统软件的编写。

硬件组装过程主要是将51单片机、温度传感器、LED指示器和蜂鸣器进行连接。

软件编写过程则是根据系统设计方案,编写相应的主程序和温度采集程序,并将程序烧录进51单片机中。

基于单片机的室内烟雾报警系统的设计

基于单片机的室内烟雾报警系统的设计

基于单片机的室内烟雾报警系统的设计摘要随着社会和经济的发展,在日常生活中做好火灾预防工作显得越来越重要了。

因此,我们设计一种结构简单、经济实用的家庭烟雾报警器来满足市场的需求。

基于供家庭使用的烟雾报警器应该具备的基本要求和功能,设计了一种比较合理适用的烟雾报警器。

该设计以单片机STC89C52和传感器MQ-2作为烟雾报警器的核心元器件,并配合其它元器件来实现声音报警等功能。

设计中选用STC89C52单片机作为控制器,选用MQ-2型半导体可燃气体敏感元件传感器来实现烟雾的检测。

烟雾报警器主要由单片机控制电路、声音报警电路、烟雾信号采集及前置放大电路、安全保护电路等构成,设计比较合理并且价格低廉、简单易懂。

论文主要针对烟雾报警的各个功能以及组成部分进行详细的介绍和说明,并对其外围设备电路和主控电路之间的接口连接方式,以及系统软件设计进行了重点的讲解和分析。

关键字:烟雾报警器;单片机;传感器The Design of Indoor Smoke Alarm System Based on MCUAbstractWith the social and economic development, fire prevention in daily life to do more and more important. Therefore, we design a simple structure, economical and practical family smoke alarm to meet the needs of the market. Based on the basic requirements and functions of smoke alarm for home use, a reasonable and applicable smoke alarm is designed.The design of single-chip STC89C52 and MQ-2 sensor smoke alarm as the core components, and with other components to achieve the voice alarm and other functions. The design of STC89C52 microcontroller as a controller, the choice of MQ-2 type semiconductor combustible gas sensor sensor to achieve smoke detection. Smoke alarm by the single-chip microcomputer control circuit, sound alarm circuit, smoke signal acquisition and preamplifier circuit, safety protection circuit, etc., the design is reasonable and inexpensive, easy to understand. In this paper, the functions and components of smoke alarm are introduced and explained in detail, and the connection mode between the peripheral circuit and the main control circuit and the design of the system software are mainly explained and analyzed.1 绪论1.1 课题背景由于科技的发展以及工农业生产,越来越多的隐患也将随之而产生。

基于单片机的烟雾监测及报警系统的设计

基于单片机的烟雾监测及报警系统的设计

基于单片机的烟雾监测及报警系统的设计烟雾监测及报警系统是一种能够及时监测室内空气中烟雾浓度的设备,并在烟雾浓度超过设定阈值时发出警报的系统。

本文将介绍基于单片机的烟雾监测及报警系统的设计。

系统的设计主要包括硬件部分和软件部分。

硬件部分包括单片机、烟雾传感器、显示器和报警器等模块,而软件部分主要是通过单片机对传感器数据进行采集和处理,并控制报警器的工作。

首先,我们需要选择合适的烟雾传感器。

烟雾传感器是一种能够感知室内空气中的烟雾浓度的设备,常用的烟雾传感器有MQ-2和MQ-135等。

这两种传感器可以通过检测环境空气中的气体浓度来判断是否存在烟雾。

接下来,我们需要选择合适的单片机用于控制整个系统。

常用的单片机有AT89S52和STM32等,我们可以根据实际需求选择合适的单片机。

单片机的选择要考虑到系统对性能和功耗的要求。

在硬件部分,我们需要将烟雾传感器与单片机进行连接。

通过传感器模块和单片机的串口通信,单片机能够通过串口接收到传感器发送的信号,并进行相应的处理。

软件部分主要是单片机的程序设计。

首先,我们需要编写一个函数用于初始化单片机和传感器。

接着,我们编写一个函数用于采集传感器的数据,并对数据进行处理。

比如,我们可以将传感器的输出电压转化为烟雾浓度值。

然后,我们可以编写一个函数用于控制报警器的工作。

当烟雾浓度超过设定阈值时,报警器将发出警报。

系统设计完成后,我们可以将所有模块进行连接并进行测试。

在测试中,可以模拟烟雾环境并观察系统的反应是否符合预期。

如果系统正常工作,即能够正常检测烟雾浓度并发出警报,那么我们可以将系统进行调试和优化。

总结而言,基于单片机的烟雾监测及报警系统是一种能够及时监测室内空气中烟雾浓度的设备,并在烟雾浓度超过设定阈值时发出警报的系统。

通过合理选择传感器和单片机,并进行正确的连接和程序设计,我们可以设计出一个性能稳定的烟雾监测及报警系统。

这种系统能够在保证室内空气质量的同时,为人们提供更加安全的居住环境。

基于LabVIEW 和单片机的报警温度监测系统的设计

基于LabVIEW 和单片机的报警温度监测系统的设计
超过上限值时,高温指示灯亮红色,当前温度测量值字体变为红色;当测量温度低于下限值 时,低温指示灯亮蓝色,当前温度测量值字体颜色为蓝色。
⑧上位机可将测试的数据(包含时间、当前温度测量值和上下限值)保存成.xls 表格。 命名为 History,保存位置为系统 C 盘。(即 c:\History.xls)
图 3.2.5 M 判断否,H 判断否,L 判断真,数据传给全局变量
5
3.3 串口数据写
图 3.3.1 OK Button 确认写操作
采用 Case 结构。输入温度上下限,确认是否按下设置按钮以进行相应的操作,若按下 按钮,则先对输入的值进行判断,若温度上限大于下限则输入有效,可传递给下位机(保留 小数点后一位)和全局变量(double 型)。若输入温度上限小于或等于下限,则提示“Input error!Please input again”输入操作无效,全局变量即温度上下限值不变。如下图所示。
1 系统功能
该系统由基于单片机的温度监测装置和基于 LabVIEW 的上位机程序两部分组成,它们 之间通过串口进行通信。基于单片机的下位机温度监测装置主要实现温度采集、温度显示、 温度报警、温度上下限值设置和串口通信等功能;基于 LabVIEW 的上位机程序主要实现串 口通信、温度显示、温度报警和温度上下限值设置等功能。基于单片机的温度监测装置的硬 件结构设计以 IAP15F2K61S2 单片机为核心,外围电路包括复位电路、温度采集电路、LED 管显示电路、蜂鸣器报警电路、矩阵键盘电路和串口通信电路等。
图 3.2.2 高温判断否,常温判断真,为常温及设置绿色字体
4
图 3.2.3 高温判断否,常温判断否,则为低温及设置蓝色字体
若 K!=M,则判断是否为 H。若 K=H,则表示报警上限。把报警上限值传递给全局变量。
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

干货联盟原理图外接USB转TTL线最小系统程序#include<reg52.h>#include<intrins.h> //包含_nop_()函数定义的头文件#include "DAAD.h"#define PCF8591 0x90 //PCF8591 地址#define uint8 unsigned char#define uint16 unsigned intsbit DQ = P2^2;sbit Speck = P2^3;sbit LED = P2^4;uint8 aa,adc2,adc3;int adc0=0,dac=65,adcx;float adcnum = 0;uint16 adc1=0;unsigned char tmp; //tmp是接收到Labview的字节uint8 baifenbi;float baifenbiFloat;unsigned char TL; //储存暂存器的温度低位unsigned char TH; //储存暂存器的温度高位unsigned int TempInt;float TempFloat;unsigned int tempdata;volatile unsigned int counter;unsigned char time_DS18B20; //设置全局变量,专门用于严格延时bit Init_DS18B20(void){bit flag_DS18B20; //储存DS18B20是否存在的标志,flag=0,表示存在;flag=1,表示不存在DQ = 1; //先将数据线拉高for(time_DS18B20=0;time_DS18B20<2;time_DS18B20++) //略微延时约6微秒;DQ = 0; //再将数据线从高拉低,要求保持480~960usfor(time_DS18B20=0;time_DS18B20<200;time_DS18B20++) //略微延时约600微秒; //以向DS18B20发出一持续480~960us的低电平复位脉冲DQ = 1; //释放数据线(将数据线拉高)for(time_DS18B20=0;time_DS18B20<10;time_DS18B20++); //延时约30us(释放总线后需等待15~60us让DS18B20输出存在脉冲)flag_DS18B20=DQ; //让单片机检测是否输出了存在脉冲(DQ=0表示存在)for(time_DS18B20=0;time_DS18B20<200;time_DS18B20++) //延时足够长时间,等待存在脉冲输出完毕;return (flag_DS18B20); //返回检测成功标志}unsigned char ReadOneChar( ){unsigned char i=0;unsigned char dat; //储存读出的一个字节数据for (i=0;i<8;i++){DQ =1; // 先将数据线拉高_nop_(); //等待一个机器周期DQ = 0; //单片机从DS18B20读书据时,将数据线从高拉低即启动读时序dat>>=1;_nop_(); //等待一个机器周期DQ = 1; //将数据线"人为"拉高,为单片机检测DS18B20的输出电平作准备for(time_DS18B20=0;time_DS18B20<3;time_DS18B20++); //延时约6us,使主机在15us内采样if(DQ==1)dat|=0x80; //如果读到的数据是1,则将1存入datelsedat|=0x00;//如果读到的数据是0,则将0存入dat//将单片机检测到的电平信号DQ存入r[i]for(time_DS18B20=0;time_DS18B20<8;time_DS18B20++); //延时3us,两个读时序之间必须有大于1us的恢复期}return(dat); //返回读出的十进制数据}void WriteOneChar(unsigned char dat){unsigned char i=0;for (i=0; i<8; i++){DQ =1; // 先将数据线拉高_nop_(); //等待一个机器周期DQ=0; //将数据线从高拉低时即启动写时序DQ=dat&0x01; //利用与运算取出要写的某位二进制数据,//并将其送到数据线上等待DS18B20采样for(time_DS18B20=0;time_DS18B20<10;time_DS18B20++);//延时约30us,DS18B20在拉低后的约15~60us期间从数据线上采样DQ=1; //释放数据线for(time_DS18B20=0;time_DS18B20<1;time_DS18B20++);//延时3us,两个写时序间至少需要1us的恢复期dat>>=1; //将dat中的各二进制位数据右移1位}for(time_DS18B20=0;time_DS18B20<4;time_DS18B20++); //稍作延时,给硬件一点反应时间}void ReadyReadTemp(void){Init_DS18B20(); //将DS18B20初始化WriteOneChar(0xCC); // 跳过读序号列号的操作WriteOneChar(0x44); // 启动温度转换for(time_DS18B20=0;time_DS18B20<100;time_DS18B20++); //温度转换需要一点时间Init_DS18B20(); //将DS18B20初始化WriteOneChar(0xCC); //跳过读序号列号的操作WriteOneChar(0xBE); //读取温度寄存器,前两个分别是温度的低位和高位}//初始化串行口void csh(){SM0=0;SM1=1;REN=1;TI=0;RI=0;//以上是初始化scon寄存器,想当于SCON=0x50;PCON=0;//初始化电源,为波特率不增加TH1=0xFd;TL1=0XFd;//设置波特率为9600TMOD|=0X20;//设置定时器,定时器1工作于8位自动重载模式, 用于产生波特率EA=1;//开总中断ES=1;//ES-串行中断允许控制位ES = 1 允许串行中断。

TR1=1;//启动定时器开始工作}void send_char(unsigned char txd)// 传送一个字符{SBUF = txd;while(!TI); // 等特数据传送TI = 0; // 清除数据传送标志}void Init_Timer0(void){TMOD |=0x01;TH0=0x00;TL0=0x00;EA=1;ET0=1;TR0=1;}main(){csh();Init_Timer0();while(1){if(counter>=20){counter = 0;switch(aa){case 0: ISendByte(PCF8591,0x41);adc0 = IRcvByte(PCF8591); //ADC0 模数转换1break;case 1: ISendByte(PCF8591,0x42);adc1 = IRcvByte(PCF8591); //ADC1 模数转换2break;case 2: ISendByte(PCF8591,0x43);adc2 = IRcvByte(PCF8591); //ADC2 模数转换3break;case 3: ISendByte(PCF8591,0x40);adc3 = IRcvByte(PCF8591); //ADC3 模数转换4break;case 4: DACconversion(PCF8591,0x40, dac); //DAC 数模转换break;}if(++aa>4) aa=0; //控制循环baifenbi = adc0;ReadyReadTemp(); //读温度准备TL=ReadOneChar(); //先读的是温度值低位TH=ReadOneChar(); //接着读的是温度值高位// LED = ~LED;// Speck = ~Speck;}}}//定时10msvoid Timer0_isr(void) interrupt 1{TH0=(65536-10000)/256;TL0=(65536-10000)%256;counter++;}void intrr() interrupt 4 //接收中断{tmp = SBUF; // 暂存接收到的数据if(RI==1){RI = 0;if(tmp==0x01) //温度上下超或者烟雾上超超过{Speck = 0;LED = 0;send_char(baifenbi); // 烟雾AD值send_char(TH); // 温度高send_char(TL); // 温度低}else{Speck = 1;LED = 1;send_char(baifenbi); // 烟雾AD值send_char(TH); // 温度高send_char(TL); // 温度低}}} Labview界面。

相关文档
最新文档