MAIN.C(126): warning C290: missing return value怎么改 5
#include<reg51.h>#include<absacc.h>#include<intrins.h>#include<math.h>#include<12864....
#include<reg51.h>
#include<absacc.h>
#include<intrins.h>
#include<math.h>
#include<12864.h>
#include<LCD1604.h>
#include<DS1302.h>
#include<SHT11.h>
#include<set_key.h>
void Delay1ms(unsigned int count) //延时函数
{
unsigned int i,j;
for(i=0;i<count;i++)
for(j=0;j<120;j++);
}
main()
{
SYSTEMTIME CurrentTime; //定义时间日期结构体
SHT_dat aa; //定义温湿度测量处理结构体
Init_12864(); //12864的显示*/
Initial_DS1302(); //DS1302初始化*/
LCD_Initial(); //LCD初始化
GotoXY(0,0); //LCD显示函数
Print("Date:");
GotoXY(16,0);
Print("Temper:");
GotoXY(0,1);
Print("Time:");
GotoXY(16,1);
Print("Humidi:");
while(1)
{
convert_SHT(&aa,TEMP); //温度转换
convert_SHT(&aa,HUMI); //湿度转换
caculation_SHT(&aa); //温度和湿度的补偿
float_convert(&aa); //将浮点数转换成整型,各个位的数分别保存
doing_temp(&aa); //检测温度是否超限
doing_humi(&aa); //检测湿度是否超限
DS1302_GetTime(&CurrentTime);
DateToStr(&CurrentTime);
TimeToStr(&CurrentTime);
GotoXY(5,0); //第一行显示日期
Print(CurrentTime.DateString);
GotoXY(23,0); //第三行显示温度
Print(aa.num_temp);
GotoXY(28,0);
Print(" ");
GotoXY(5,1); //第二行显示时间
Print(CurrentTime.TimeString);
GotoXY(23,1); //第四行显示湿度
Print(aa.num_humi);
GotoXY(28,1);
Print(" ");
Delay1ms(300); //延时
}
} 展开
#include<absacc.h>
#include<intrins.h>
#include<math.h>
#include<12864.h>
#include<LCD1604.h>
#include<DS1302.h>
#include<SHT11.h>
#include<set_key.h>
void Delay1ms(unsigned int count) //延时函数
{
unsigned int i,j;
for(i=0;i<count;i++)
for(j=0;j<120;j++);
}
main()
{
SYSTEMTIME CurrentTime; //定义时间日期结构体
SHT_dat aa; //定义温湿度测量处理结构体
Init_12864(); //12864的显示*/
Initial_DS1302(); //DS1302初始化*/
LCD_Initial(); //LCD初始化
GotoXY(0,0); //LCD显示函数
Print("Date:");
GotoXY(16,0);
Print("Temper:");
GotoXY(0,1);
Print("Time:");
GotoXY(16,1);
Print("Humidi:");
while(1)
{
convert_SHT(&aa,TEMP); //温度转换
convert_SHT(&aa,HUMI); //湿度转换
caculation_SHT(&aa); //温度和湿度的补偿
float_convert(&aa); //将浮点数转换成整型,各个位的数分别保存
doing_temp(&aa); //检测温度是否超限
doing_humi(&aa); //检测湿度是否超限
DS1302_GetTime(&CurrentTime);
DateToStr(&CurrentTime);
TimeToStr(&CurrentTime);
GotoXY(5,0); //第一行显示日期
Print(CurrentTime.DateString);
GotoXY(23,0); //第三行显示温度
Print(aa.num_temp);
GotoXY(28,0);
Print(" ");
GotoXY(5,1); //第二行显示时间
Print(CurrentTime.TimeString);
GotoXY(23,1); //第四行显示湿度
Print(aa.num_humi);
GotoXY(28,1);
Print(" ");
Delay1ms(300); //延时
}
} 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询