基于Zig Bee協議的溫度濕度無線傳感器網絡 3 辛 穎, 謝光忠, 蔣亞東 (電子科技大學光電信息學院,四川成都610054) 摘 要: 闡述了一種溫度濕度智能數據采集的無線傳感器網絡,介紹了傳感器節點的軟件與硬件設計。 該系統基于Zig Bee無線通信協議設計,克服了有線傳感器網絡的局限性,避免了其他無線通信技術的高 功耗的缺點,節點成本低、網絡容量大、生存周期長。實驗結果表明:溫度測量精度為1 ℃,濕度精度為 3 %rh,可以廣泛用于環境檢測。 關鍵詞: 溫度 濕度 無線 傳感器網絡 紫蜂
上傳時間: 2013-12-20
上傳用戶:s363994250
This application note gives an example for microcontroller C code. It includes code for: Readout of Humidity (rh) or Temperature (T) with basic error handling Calculation of rh linearization and temperature compensation Access to status register Dewpoint calculation from rh and T UART handling
標簽: code microcontroller application for
上傳時間: 2013-12-22
上傳用戶:hewenzhi
STM32F103開發板 DHT11溫濕度DS18B20 氣體MQ-2光敏聲控雨滴傳感器實驗程序**--------------------------------------------------------------------------------------------------------** Created by: FiYu** Created date: 2015-12-12** Version: 1.0** Descriptions: DHT11溫濕度傳感器實驗 **--------------------------------------------------------------------------------------------------------** Modified by: FiYu** Modified date: ** Version: ** Descriptions: ** Rechecked by: **********************************************************************************************************/#include "stm32f10x.h"#include "delay.h"#include "dht11.h"#include "usart.h"DHT11_Data_TypeDef DHT11_Data;/************************************************************************************** * 描 述 : GPIO/USART1初始化配置 * 入 參 : 無 * 返回值 : 無 **************************************************************************************/void GPIO_Configuration(void){ GPIO_InitTypeDef GPIO_InitStructure; /* Enable the GPIO_LED Clock */ RCC_APB2PeriphClockCmd( RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB | RCC_APB2Periph_AFIO , ENABLE); GPIO_DeInit(GPIOB); //將外設GPIOA寄存器重設為缺省值 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP; //推挽輸出 GPIO_Init(GPIOB, &GPIO_InitStructure); GPIO_DeInit(GPIOA); //將外設GPIOA寄存器重設為缺省值 GPIO_InitStructure.GPIO_Pin = GPIO_Pin_9; GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP; //推挽輸出 GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_InitStructure.GPIO_Pin = GPIO_Pin_10; GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING; //浮空輸入 GPIO_Init(GPIOA, &GPIO_InitStructure); GPIO_SetBits(GPIOB , GPIO_Pin_9); //初始狀態,熄滅指示燈LED1}/************************************************************************************** * 描 述 : 串口顯示實時溫濕度 * 入 參 : 無 * 返回值 : 無 **************************************************************************************/void DHT11_SCAN(void){ if( Read_DHT11(&DHT11_Data)==SUCCESS) { printf("\r\n讀取DHT11成功!\r\n\r\n濕度為%d.%d %rh ,溫度為 %d.%d℃ \r\n",\ DHT11_Data.humi_int,DHT11_Data.humi_deci,DHT11_Data.temp_int,DHT11_Data.temp_deci); //printf("\r\n 濕度:%d,溫度:%d \r\n" ,DHT11_Data.humi_int,DHT11_Data.temp_int); } else { printf("Read DHT11 ERROR!\r\n"); }}/************************************************************************************** * 描 述 : MAIN函數 * 入 參 : 無 * 返回值 : 無 **************************************************************************************/int main(void){ SystemInit(); //設置系統時鐘72MHZ GPIO_Configuration(); USART1_Init(); //初始化配置TIM DHT11_GPIO_Config(); // 初始化溫濕度傳感器PB1引腳初始時為推挽輸出 GPIO_ResetBits(GPIOB , GPIO_Pin_9); delay_ms(500); while(1) { GPIO_SetBits(GPIOB , GPIO_Pin_9); DHT11_SCAN(); //實時顯示溫濕度 delay_ms(1500); } }
上傳時間: 2022-05-03
上傳用戶:得之我幸78
SHT30DIS是高精度溫濕度傳感器,溫度為±0.3℃,濕度為±2%rh,應用廣泛,體積小,封裝DFN-8,I2C接口,本程序為溫濕度傳感器SHT30的驅動程序,并且是51內核單片機的驅動程序,內含sht30.c和sht30.h兩個文件。
上傳時間: 2022-06-26
上傳用戶:
Datasheet SHT3x-DISHumidity and Temperature Sensor? Fully calibrated, linearized, and temperaturecompensated digital output? Wide supply voltage range, from 2.4 V to 5.5 V? I2C Interface with communication speeds up to 1MHz and two user selectable addresses? Typical accuracy of ? 2 %rh and ? 0.3 °C? Very fast start-up and measurement time? Tiny 8-Pin DFN package
上傳時間: 2022-06-29
上傳用戶: