主函数

来源:互联网 发布:sm2密码算法使用规范 编辑:程序博客网 时间:2024/06/10 04:08
/***********************************************************                     **   主程序      **  ***********************************************************/#include <reg52.h>#include <intrins.h>#include <stdio.h>#include "delay.h"#include "lcd.h"#include "main.h"//#include "chuankou.h"#include "wenshi.h"#include "act.h"#include "ir.h"void main(){                  LCD_init();             //LCD初始化 LCD_clear(2);           //清屏 2表示背景为蓝色         showmenu();             //彩屏显示菜单 ir(); ini() ;          //串口初始化      while(1)        {                   read_TRH();      //读取温湿度传感器的值ad();            //通过AD转换读取co2和光照的值showfigure();    //更新收集到的数据并在彩屏上显示               // assign();        //将上位机传来的指令分解处理act();           //根据设定值和当前值做出反应                sendall();       //从串口发送所测的所有值                       }     }

0 0
原创粉丝点击