51温度湿度c语言代码探索.docVIP

  • 3
  • 0
  • 约1.15万字
  • 约 14页
  • 2017-01-29 发布于湖北
  • 举报
#ifndef __TOU_H__//如果没有被编译过 #define __TOU_H__//那么标记为编译过 #includereg52.h #include intrins.h #include math.h #includestring.h #define uint unsigned int #define uchar unsigned char enum {TEMP,HUMI}; sbit DATA = P2^5;//温湿度传感器位定义 sbit SCK = P2^4; void s_connectionreset(void);/******** SHT11函数声明 ********/ char s_measure(unsigned char *p_value, unsigned char *p_checksum, unsigned char mode); void calc_sth10(float *p_humidity ,float *p_temperature); float calc_dewpoint(float h,float t); #endif//结束#ifndef,如果已经编译过就跳过之间的部分 uchar code table1[]=00:00:00; uchar code table2[]=00:00:00RH:00.0;

文档评论(0)

1亿VIP精品文档

相关文档