91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 74KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-27
  • 語言: 其他
  • 標簽: CC2530??SHT11??

資源簡介

基于CC2530芯片,及SHT11溫濕度傳感器的實驗。

資源截圖

代碼片段和文件信息

/*?包含頭文件?*/
/********************************************************************/
#include?
#include?
#include?

#include?“./uart/hal_board_cfg.h“
#include?“./uart/hal_uart.h“
#include?“./sht11/sht11.h“
/********************************************************************/
//定義控制燈的端口
#define?LED1?P1_0
#define?LED2?P1_1

#define?uint?unsigned?int
#define?uchar?unsigned?char

void?LedInit(void)
{
??P1DIR?|=?0x03;?//設置LED
??LED1?=?1;
??LED2?=?1;
}
/*********************************************************************
?*?函數名稱:main
?*?功????能:main函數入口
?*?入口參數:無
?*?出口參數:無
?*?返?回?值:無
?********************************************************************/
void?main(void)
{
????char?temp_buf[10];
????char?humi_buf[10];
????float?humitemp;
????
????LED1?=?0;???????//LED1點亮,表示程序啟動
????InitUart();?????//?初始化串口???bautrate:57600
????Sht11Init();???
????
????while(1)
????{
????????if(GetHumiAndTemp(&humi&temp)?==?0)
????????{
?????????????sprintf(humi_buf?(char?*)“%f“?humi);
?????????????sprintf(temp_buf?(char?*)“%f“?temp);
??????
?????????????prints(“temp:“); ?prints(temp_buf);
?????????????prints(“?????humi:“); ?prints(humi_buf);
?????????????prints(“\r\n“);
?????????????
?????????????Sht11Delay(50000);??
?????????????Sht11Delay(50000);???
?????????????Sht11Delay(50000);??
?????????????
?????????????LED2?=?!LED2;???????????//LED2閃爍,表示溫濕度采樣正常
????????}
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2015-07-01?17:05??Exp6\
?????文件???????26857??2011-12-20?16:16??Exp6\Backup?of?Exp6.ewd
?????文件???????53194??2011-12-20?16:17??Exp6\Backup?of?Exp6.ewp
?????目錄???????????0??2015-04-10?09:37??Exp6\Debug\
?????目錄???????????0??2015-06-30?11:40??Exp6\Debug\Exe\
?????文件??????119774??2015-06-30?11:40??Exp6\Debug\Exe\Exp6.d51
?????目錄???????????0??2013-09-16?11:08??Exp6\Debug\List\
?????目錄???????????0??2015-07-01?17:05??Exp6\Debug\Obj\
?????文件?????????209??2015-07-01?17:05??Exp6\Debug\Obj\Exp6.pbd
?????文件???????10194??2015-06-30?11:40??Exp6\Debug\Obj\hal_uart.r51
?????文件???????12786??2015-06-30?11:40??Exp6\Debug\Obj\main.r51
?????文件???????73368??2015-06-30?11:40??Exp6\Debug\Obj\sht11.r51
?????文件????????3962??2015-07-01?17:05??Exp6\Exp6.dep
?????文件???????34274??2015-06-30?11:40??Exp6\Exp6.ewd
?????文件???????56350??2015-06-30?11:40??Exp6\Exp6.ewp
?????文件?????????158??2011-12-20?16:16??Exp6\Exp6.eww
?????文件????????1532??2011-12-26?19:27??Exp6\main.c
?????目錄???????????0??2015-04-10?09:37??Exp6\settings\
?????文件????????1196??2015-07-01?17:05??Exp6\settings\Exp6.cspy.bat
?????文件????????3949??2015-07-01?17:05??Exp6\settings\Exp6.dbgdt
?????文件?????????726??2015-07-01?17:05??Exp6\settings\Exp6.dni
?????文件????????2573??2015-07-01?17:05??Exp6\settings\Exp6.wsdt
?????目錄???????????0??2015-04-10?09:37??Exp6\sht11\
?????文件????????8883??2011-12-05?13:46??Exp6\sht11\sht11.c
?????文件????????1967??2011-12-05?13:31??Exp6\sht11\sht11.h
?????目錄???????????0??2015-04-14?16:41??Exp6\uart\
?????文件???????18833??2009-12-11?11:19??Exp6\uart\hal_board_cfg.h
?????文件????????4969??2008-10-07?14:47??Exp6\uart\hal_defs.h
?????文件????????8101??2009-12-24?10:11??Exp6\uart\hal_mcu.h
?????文件????????4109??2008-03-20?17:17??Exp6\uart\hal_types.h
?????文件????????1910??2011-12-05?13:31??Exp6\uart\hal_uart.c
............此處省略2個文件信息

評論

共有 條評論