初级会员

- 积分
- 83
- 金钱
- 83
- 注册时间
- 2012-10-16
- 在线时间
- 0 小时
|

楼主 |
发表于 2014-4-8 09:10:55
|
显示全部楼层
回复【2楼】正点原子:
---------------------------------
main.c的一个函数中
if(key==1) {Data.Bt+=1.6; }
if(key==2) Data.Dh+=1;
if(key==4) {Data.Bt-=1.2; Data.Dh-=1;}
app.c的一个函数中
Lcd_printf(10,140,BLACK,WHITE,0,"温度:%2.1f℃ 湿度:%2d%% 压强:%3.2fKPa ",(Data.Bt+Data.Dt)/2.0,Data.Dh,Data.Bp);
另外一个函数
void Data_Init(void)
{
Data.Ax=10.1; // 加速度X轴垂角
Data.Ay=10.2;
Data.Az=10.2;
Data.Bt=25.1; //bmp085温度
Data.Bp=101.25; //bmp085压强
Data.Dt=25;
Data.Dh=65;
Data.AdcLight = 1032; //通道10 返回4次采样的平均值
Data.AdcMQ = 1023; //通道15
Data.AdcFire = 1024; // 通道14
Data.AdcOut = 1024; // 通道11
}
void Data_Init(void);在main中执行
就是一个简单的调用和在屏幕上显示。想测试一下,结果不行,我在网上看了几种方法,但是都没有反应啊、 |
|