楊宸 彭洋 劉延軍



摘? 要: 本文基于ZigBee無線傳感網,樹莓派設計了一款個人氣象系統(tǒng)。該系統(tǒng)選擇溫濕度,雨量,光照傳感器對環(huán)境參數進行實時的采集與存儲。系統(tǒng)利用CC2530射頻芯片完成Zigbee協議功能,結合ESP8266作為網關將數據傳給樹莓派,樹莓派作為服務器實現對相關數據的存儲。用戶通過訪問樹莓派即可實時掌握天氣的變化情況。實驗結果表明,該系統(tǒng)能實現一定的環(huán)境監(jiān)測,可擴展的范圍廣。
關鍵詞: ZigBee;ESP8266;樹莓派;局域網;傳感器
中圖分類號: TP393 ???文獻標識碼: A??? DOI:10.3969/j.issn.1003-6970.2020.07.008
本文著錄格式:楊宸,彭洋,劉延軍. 基于ZigBee和樹莓派的個人氣象系統(tǒng)設計與實現[J]. 軟件,2020,41(07):42-44+102
Design and Implementation of Personal WeatherSystem Based on ZigBee and Raspberry Pi
YANG Chen, PENG Yang, LIU Yan-jun
(School of Computer And Information Technology, Northeast Petroleum University, Daqing 163318, China)
【Abstract】: This article is based on ZigBee wireless sensor network, Raspberry Pi has designed a personal weather system. The system selects temperature and humidity, rainfall, and light sensors to collect and store environmental parameters in real time. The system uses the CC2530 radio frequency chip to complete the Zigbee protocol function, combines ESP8266 as a gateway to transmit data to the Raspberry Pi, and the Raspberry Pi acts as a server to store relevant data. By accessing the Raspberry Pi, users can grasp the changes of the weather in real time. The experimental results show that the system can achieve certain environmental monitoring and can be expanded in a wide range.
【Key words】: ZigBee; ESP8266; Raspberry Pi; LAN; Sensor
0? 引言
隨著我國生產力的不斷進步,實現小范圍地區(qū)環(huán)境參數的監(jiān)測具有重要的戰(zhàn)略應用價值。目前,我國的公共氣象數據的來源都是基于地面上的氣象觀測基站,其分辨率較低,并且計算出的結果僅是該區(qū)域的平均值,無法提供較為準確的氣象數據[1]。
除此之外,氣象站的服務對象是城市而不是單獨的個人,氣象站處理的信息量龐大,從監(jiān)測到發(fā)布程序多,使得氣象站的信息不能提供實時的環(huán)境數據,其數據價值也就大打折扣。
本文針對上述問題設計了一個基于ZigBee技術的個人氣象系統(tǒng)。該系統(tǒng)在ZigBee無線傳感網的
基礎上開發(fā),結合ZigBee低功耗,低成本,擴展性強的優(yōu)勢[2-4],使得該個人氣象系統(tǒng)能夠以較低的成本監(jiān)測較大規(guī)模的氣象環(huán)境。系統(tǒng)采用ZigBee技術與樹莓派相結合的方式,能夠存儲實時的氣象數據,為智能家居或其他開發(fā)提供氣象方面的數據支持。……