Cov txheej txheem:
- Kauj Ruam 1: Yam Koj Yuav Tsum Tau:
- Kauj Ruam 2: Cov Cuab Yeej:
- Kauj Ruam 3: Ua Kom Ruaj Ntseg:
- Kauj ruam 4: Ntsis:
- Kauj Ruam 5: Txuas Nws Txhua Qhov Ua Ke:
- Kauj Ruam 6: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key
- Kauj Ruam 7: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key, Sau Npe
- Kauj Ruam 8: Yuav Ua Li Cas Thiaj Li Qhib OpenWeatherMap, Tau API Key
- Kauj Ruam 9: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key, Sau Npe
- Kauj ruam 10: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key, Tsim Tus Kheej
- Kauj Ruam 11: Teeb Arduino IDE:
- Kauj Ruam 12: Xaiv Koj Pawg Thawj Coj:
- Kauj Ruam 13: Xaiv Serial Port:
- Kauj Ruam 14: WeatherStation.ino
- Kauj ruam 15: Kho WeatherStation.ino
- Kauj Ruam 16: Tshaj Tawm Txoj Cai rau Koj Tus ESP8266
- Kauj Ruam 17: Yuav Ua Li Cas Saib Huab Cua Cov Ntaub Ntawv Lub Vev Xaib
- Kauj Ruam 18: Ua kev zoo siab, Koj Ua Tiav lawm
Video: Tsis Tau Lwm Qhov Chaw Huab Cua (YA.W.S.): 18 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Txoj haujlwm no yog kuv coj mus rau Chaw Nres Tsheb Huab Cua. Kuv li yog nyob ntawm ESP8266,.96 "OLED zaub thiab BME280 ib puag ncig lub teeb sensor. Cov Chaw Huab Cua zoo li yog txoj haujlwm nrov heev. Kuv qhov sib txawv ntawm nws tus kheej los ntawm lwm tus los ntawm kev siv BME280 sensor array hloov qhov nrov DHT22 qhov ntsuas kub thiab av noo. BME280 muaj qhov ntsuas kub, av noo thiab huab cua ntsuas qhov ntsuas. Nws kuj tseem siv I2C interface. Lub.96 "OLED zaub siv kuj yog I2C. Nws tuaj yeem raug yuav raws li I2C lossis SPI lossis ob qho tib si. Kuv tau mus nrog I2C version txhawm rau ua kom yooj yim rau txoj hlua. Nrog ob qho tib si OLED zaub thiab BME280 siv I2C thiab 3.3V nws yooj yim heev los ua 'Y' cable txuas ob lub cuab yeej rau ESP8266. Thaum tsim txoj haujlwm no kuv tau hla ntau qhov chaw ua haujlwm huab cua hauv Internet uas siv ESP8266, tib lub OLED zaub thiab BME280. Yog li qhov no tsis yog thawj lub tswv yim, tab sis nws yog thawj qhov kev siv.
BME280 muab cov ntaub ntawv sab hauv ib puag ncig. Cov ntaub ntawv huab cua sab nraud tau txais los ntawm OpenWeatherMap.org. Koj yuav tsum tau kos npe nrog OpenWeatherMap.org kom tau tus yuam sij nkag mus rau cov ntaub ntawv huab cua. Lawv muab kev pabcuam dawb, uas yog yam kuv tau siv. Saib cov kauj ruam Yuav Tau Txais OpenWeatherMap Key rau cov lus qhia yuav ua li cas thiaj tau tus yuam sij.
NTP lub sijhawm server tau siv kom tau txais lub sijhawm ntawm ib hnub thiab ib hnub ntawm ib-lub lim tiam.
Cov ntaub ntawv huab cua, sijhawm thiab ib puag ncig tau tshwm rau ntawm OLED zaub. Txhua daim ntawm cov ntaub ntawv nws muaj nws tus kheej cov ntawv tshuaj ntsuam. Cov ntxaij vab tshaus tau tshwm rau tsib vib nas this ua ntej hloov mus rau lwm qhov. OpenWeatherMap.org tau nkag mus rau txhua kaum tsib feeb los kho cov ntaub ntawv huab cua. BME280 tau nyeem txog txhua tsib caug-tsib vib nas this. Cov font siv ntawm txhua lub vijtsam tau hloov kho kom pom tag nrho cov ntaub ntawv hauv cov font loj tshaj plaws.
ESP8266 kuj tseem teeb tsa ua lub vev xaib. Txhua yam ntaub ntawv huab cua tuaj yeem nkag mus siv lub browser los ntawm koj lub xov tooj, ntsiav tshuaj ntawm computer. Ib qho ntawm cov ntxaij vab tshaus uas tau tshwm sim qhia tus IP chaw nyob ntawm lub web server.
ESP8266 los ntawm ntau yam duab thiab ntau thiab tsawg. Kuv xaiv GEEKCREIT DoIt ESP12E Dev Kit V2. Qhov no yog qhov ua tau zoo nrog NodeMCU 'tus qauv' rau ESP8266 cov qauv ib leeg. Nws muaj kev koom ua ke 3.3V tus tswj hwm, CH340 ua tus choj USB-rau-Serial thiab NodeMCU pib rov pib dua Circuit. Koj muaj kev ywj pheej siv ib qho ESP8266-12 tus qauv uas koj muaj. Tsuas yog paub tias koj yuav tsum tau ntxiv 3.3V tus tswj hwm lossis lwm yam khoom siv hluav taws xob los ua haujlwm rau nws. Kuv kuj tau tsim ib qho siv Witty Cloud ESP8266. Nws tso cai rau kuv ntim txhua yam rau hauv 1.5 nti lub voos xwmfab. Sab laug USB choj pawg thawj coj tau raug txiav tawm tom qab kev ua haujlwm. Kuv ntxiv txoj cai lub taub hau taub hau rau 3.3V qhov ntawm Witty board. Lub sam xauv nees tau ua nrog ob plaub lub plhaub, ib ob lub plhaub ntsaws thiab ob lub plhaub ntsaws.
Hauv daim duab saum toj no, pawg thawj coj uas ESP8266 tus qauv tau txuas rau yog lub rooj sib tham hauv Circuit Court uas kuv tau tsim los ua pawg thawj coj rau ESP8266 thiab ESP32. Nws yuav lees txais NodeMCU sib xws, lub cev nqaim ESP8266 cov laug cam, Witty Cloud ESP8266 board lossis ESP32 board los ntawm GEEKCREIT. Txhua qhov muaj GPIO pins tau tawg tawm rau lub taub hau kom nkag tau yooj yim. Kuv tau pom tias feem ntau cov phiaj xwm kev txhim kho yeej tsis muaj lub zog txaus thiab cov pins hauv av. Txhua lub sijhawm koj xav muab qee yam koj xav tau yam tsawg kawg yog tus pin hauv av thiab feem ntau yog tus pin los txhawb lub cuab yeej. Txhua kab ntawm GPIO pins yog nrog 3.3V fais fab tus pin thiab tus pin hauv av. Kuv siv cov txheej txheem tib yam uas Thawj Robotics siv, lub zog nyob nruab nrab. Kuv nyiam qhov txheej txheem no vim tias yog koj ntsaws ib yam dab tsi rau tom qab koj tsis tso cov pa luam yeeb. Lub Rooj Tswjhwm Saib muaj ob peb yam ntxiv, IR sensor, lub laub khawm hloov thiab lub teeb xim LED. Jumpers tuaj yeem siv los txuas rau ib qho ntawm cov yam ntxwv no. Yog tias koj txaus siab rau ib qho ntawm ESPxx pawg thawj coj tawm ntawd hu rau kuv.
Kauj Ruam 1: Yam Koj Yuav Tsum Tau:
1 - BME280 I2C Kub, Vaum thiab Siab sensor lub rooj tsavxwm
Kuv yuav kuv li ntawm Ebay los ntawm Tuam Tshoj rau thaj tsam $ 1.25 nrog kev xa khoom dawb. Kuj tseem muaj los ntawm Adafruit lossis Sparkfun
1 -.96 , 128x64, I2C OLED zaub siv SSD1306 tus tsav tsheb
Kuv yuav kuv li ntawm Ebay los ntawm Tuam Tshoj rau thaj tsam $ 4.00. Kuv yog dawb. Koj tuaj yeem pom xiav thiab dawb nrog thaj tsam daj nyob saum. Qee qhov muag raws li SPI thiab I2C. Koj yuav tsum tau tshem qee tus tiv thaiv kom xaiv I2C kev ua haujlwm. Qhov tseem ceeb yog nws siv SD1306 tus tsav tsheb. Kuj tseem muaj los ntawm Adafruit.
1-NodeMCU ESP8266-12 nrog CH340
Koj tuaj yeem siv ib qho ESP8266-12 tus qauv uas koj xav tau. Kuv nyiam cov uas muaj CH340 USB-rau-Serial choj. Muaj qhov khaus ntawm FTDI cuav thiab SI choj chips ob peb xyoos dhau los yog li kuv tsis ntseeg dab tsi ntxiv uas yog CH340.
2 - DuPont 4 tus pin, 0.1inch (2.54mm) lub suab zoo
2 - DuPont 2 tus pin, 0.1inch (2.54mm) lub suab zoo
12-DuPont poj niam crimps rau 22-28 awg xaim
Kuv tau txais kuv ntawm Ebay. Koj tseem tuaj yeem siv Molex lossis lwm lub npe uas koj nyiam. Crimped pins lossis IDC Qhov kev xaiv yog koj li. Ceev faj tias koj yuav cov pins raug rau koj lub plhaub. Lawv tsis sib xyaw thiab sib phim. Koj tseem tuaj yeem tsuas yog xaim cov xov hlau rau cov laug cam thiab tshem tawm cov khoom sib txuas. Yog tias koj siv tus pin crimped, koj yuav xav tau tus crimper. Tsis txhob sim crimp nrog ib khub pliers. Nws tsis ua haujlwm.
1 - 5V, 1A yam tsawg kawg nkaus phab ntsa pob.
Cov no yog pheej yig thiab muaj nyob ntawm Ebay. Tau txais ib qho nrog micro USB txuas lossis xijpeem phooj ywg nrog koj ESP8266 pawg thawj coj.
Koj tseem yuav xav tau yim daim ntawm 22-28 awg xaim txuas txhua yam ua ke. Lossis koj tuaj yeem xaim nws txhua yam rau ib daim ntawm daim txiag ntoo. Nws yog nyob ntawm koj.
Kuv tau suav nrog daim duab ntawm yam uas tau siv los tsim Lub Chaw Huab Cua siv Witty Cloud ESP8266. Ib daim duab qhia meej qhov twg ntxiv rau lub kaum sab xis lub taub hau taub hau kom tuaj tos 3.3V. Ib qho ntawm ob tus pin zoo li tau hloov los ntawm ob qho tib si tus pin. Hauv av thiab 3.3V cov xov hlau tau muab tso rau hauv ib tus pin zoo li.
Ua raws qhov txuas no kom tau txais cov ntaub ntawv cov cai los ntawm GitHub chaw cia khoom; ESP8266-Huab Cua-Chaw Nres Tsheb. Zip folder lossis cloned folder yuav muaj WeatherStation nplaub tshev uas muaj WeatherStation.ino thiab BME280.h. Cov no yog cov ntaub ntawv qhov chaws. Muaj ntau daim ntawv pdf ib yam nkaus. Cov ntaub ntawv pdf muaj ntau cov ntaub ntawv tib yam li cov lus qhia no.
Kauj Ruam 2: Cov Cuab Yeej:
Tom qab sim ntau lub hom phiaj ntawm cov neeg ua phem, Kuv pom tias tus kws kho mob Nyij Pooj PA-21 lossis PA-09 ua haujlwm zoo tshaj plaws rau DuPont txiv neej thiab poj niam crimps. Nws muaj nyob ntawm Ebay lossis Amazon. Ib qho twg yuav ua haujlwm rau DuPont pins. PA-09 tseem yuav ua tus pin rau JST cov khoom sib txuas feem ntau siv ntawm LiPo roj teeb. Nov yog qhov txuas rau daim vis dis aus hais txog yuav siv Engineer crimpers nrog DuPont crimps li cas; Yuav siv PA-21 Crimpers li cas
Cov lus qhia tsis ntev los no tau muaj kev qhia zoo txog kev siv Weierli Cov Cuab Yeej SN-28B crimpers nrog DuPont pins thiab lub plhaub. Koj tuaj yeem pom nws ntawm no; Ua Zoo Dupont Pin-Crimp Txhua Lub Sijhawm!
Kauj Ruam 3: Ua Kom Ruaj Ntseg:
Cov hlua hluav taws xob yog tus yuam sij rau txoj haujlwm no. Nws yog ib qho yooj yim plaub hlau 'Y' cable. Saum toj no yog daim duab ntawm txoj hlua uas kuv tau ua. OLED zaub thiab BME280 sensor array muaj tib lub pinout. Qhov no txhais tau tias ob plaub lub plhaub zoo ib yam zoo ib yam tom qab tso cov xov hlau txuas. Kuv tau ua kuv txoj hlua khi nrog ob txoj hlua khi txuas mus rau ob lub plhaub ntsaws uas txuas rau ESP8266 pawg thawj coj. Koj tuaj yeem hloov pauv, xaiv cov khoom ua ob txoj hlua khi rau hauv ib ntawm plaub tus pin zoo li, ua rau nws zoo li daisy saw txuas. Ib qho twg yuav ua haujlwm.
- Txiav tag nrho koj cov xov hlau kom ntev. Kuv nyiam siv cov xim sib txawv rau txhua lub xaim; liab rau 3.3V, dub rau hauv av, daj rau SCL thiab ntsuab rau SDA.
- Sawb ib kawg ntawm txhua lub xov hlau txog 0.1 nti.
- Twist cov strands ua ke thiab ntxiv tus poj niam crimp.
- Thaum tag nrho cov xov hlau muaj crimp ntawm ib kawg, hle tag nrho cov xov hlau txog 0.2 nti.
- Twist cov hlua ntawm ob lub xov hlau ntawm tib xim ua ke.
- Thaum sib tw, txiav mus txog 0.1 nti thiab ntxiv poj niam crimp.
- Thaum tag nrho cov hlau txuas tau crimped nws yog lub sijhawm los ntxig cov crimped kawg rau hauv lub plhaub.
- Ob lub plaub tus pin zoo li cov khoom, ntawm sab laug mus rau sab xis, nrog liab, dub, daj, ntsuab lossis 3.3V, Gnd, SCL, SDA.
- Ib qho ntawm ob tus pin zoo li tau txais cov xov tooj liab thiab dub.
- Lwm ob lub plhaub tus pin tau txais cov xov hlau daj thiab ntsuab.
Kauj ruam 4: Ntsis:
Kuv pom tias thaum kuv siv 28 awg xaim nrog cov hlua khawm uas lawv zoo li poob. Qhov kuv ua los tiv thaiv qhov no yog hle qhov kawg ntawm cov xaim ob zaug kom ntev li qub. Muab cov xov hlau tso ua ke. Tom qab ntawd ntswj cov hlua sib tw hla kom tuab ob npaug. Tam sim no thaum kuv crimp nws cov hlau yog tuab txaus kom nruj.
Kauj Ruam 5: Txuas Nws Txhua Qhov Ua Ke:
- Txuas plaub tus pin zoo li lub OLED thiab BME280 cov laug cam.
- Teem txoj kab liab nrog Vcc thiab 3V3 tus pin.
- Txuas ob tus pin liab/dub lub plhaub rau ib khub ntawm 3V3 (3.3V) thiab GND pins ntawm ESP8266 pawg thawj coj saib. Muaj peb qhov chaw ntawm pawg thawj coj saib qhov twg 3V3 thiab GND pins nyob ib sab. Zam lub Vin (5V) thiab GND pins raws li cov no yuav tso cov pa luam yeeb tawm ntawm koj lub OLED thiab BME280 cov laug cam. Xyuas kom tseeb tias cov xaim liab txuas nrog 3V3 tus pin.
- Txuas lub daj/ntsuab ob lub plhaub ntsaws rau D1 thiab D2 ntawm ESP8266 lub rooj tsavxwm. Cov xaim daj (SCL) yuav tsum nyob ntawm D1.
Txheeb xyuas koj cov kev sib txuas ob zaug. Yog tias txhua yam zoo li zoo koj tau npaj los txhawb ESP8266 pawg thawj coj.
Kauj Ruam 6: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key
Koj yuav xav tau tus lej API nkag mus rau OpenWeatherMap.org lub vev xaib kom tau txais cov ntaub ntawv huab cua tam sim no. Ob peb kauj ruam tom ntej nthuav qhia yuav ua li cas rau npe nrog OpenWeatherMap.org thiab tau txais tus lej API.
Ua raws qhov txuas no mus rau OpenWeatherMap.org.
Nyem rau API ze nruab nrab ntawm sab saum toj ntawm nplooj ntawv web.
Kauj Ruam 7: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key, Sau Npe
Ntawm sab laug, hauv qab cov ntaub ntawv huab cua tam sim no, nyem rau pob Subscribe.
Kauj Ruam 8: Yuav Ua Li Cas Thiaj Li Qhib OpenWeatherMap, Tau API Key
Nyem rau Txais APIkey thiab Pib hauv kab ntawv pub dawb.
Kauj Ruam 9: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key, Sau Npe
Nyem rau ntawm Sau Npe khawm hauv qab Yuav Ua Li Cas thiaj tau txais API tus yuam sij (APPID).
Kauj ruam 10: Yuav Ua Li Cas Tau Txais OpenWeatherMap Key, Tsim Tus Kheej
Sau rau txhua daim teb. Thaum ua tiav, khij qhov kuv pom zoo rau Cov Lus Hais Txog Kev Pabcuam thiab Txoj Cai Ntiag Tug. Tom qab ntawd nyem rau ntawm Tsim Tus Kheej khawm.
Txheeb koj tus email rau cov lus los ntawm OpenWeatherMap.org. Tus email yuav muaj koj tus lej API. Koj yuav tsum tau theej tus lej API nkag mus rau qhov chaws rau Chaw Tiv Thaiv Huab Cua kom tau txais huab cua tam sim no.
Qhov kev pabcuam pub dawb OpenWeatherMap.org muaj qee qhov txwv. Qhov tseem ceeb tshaj plaws yog koj tsis tuaj yeem siv nws ntau dua li ib zaug txhua kaum feeb. Qhov no yuav tsum tsis muaj teeb meem vim huab cua tsis hloov pauv sai. Lwm qhov kev txwv yuav tsum ua nrog cov ntaub ntawv twg muaj. Ib qho ntawm cov ntawv sau npe them nyiaj yuav muab cov ncauj lus ntxaws ntxaws txog huab cua.
Kauj Ruam 11: Teeb Arduino IDE:
Kev tsim kho txoj haujlwm tau ua tiav siv Arduino IDE Version 1.8.0. Koj tuaj yeem rub tawm qhov tseeb Arduino IDE ntawm no; Arduino IDE Cov. Arduino lub vev xaib muaj cov lus qhia zoo txog kev teeb tsa thiab siv IDE li cas. Kev txhawb nqa rau ESP8266 tuaj yeem teeb tsa hauv Arduino IDE los ntawm kev ua raws cov lus qhia los ntawm qhov txuas no: ESP8266 Addon rau Arduino. Ntawm nplooj ntawv web, nyem rau "Clone lossis Download" khawm thiab xaiv "Download Zip". Cov ntaub ntawv ReadMe.md muaj cov lus qhia yuav ua li cas ntxiv ESP8266 kev txhawb nqa rau Arduino IDE. Nws yog cov ntawv nyeem yooj yim uas koj tuaj yeem qhib nrog txhua tus ntawv sau.
ESP8266 cov laug cam tuaj nyob hauv txhua qhov ntau thiab tsawg, duab thiab siv sib txawv USB-rau-Serial choj chips. Kuv nyiam cov laug cam uas siv CH340 tus choj txuas. Ob peb xyoos dhau los FTDI, SI thiab lwm tus tau nkees ntawm cov pob zeb pheej yig thov kom yog lawv cov khoom. Cov neeg tsim khoom hloov pauv thier tus lej tsav tsheb tsuas yog ua haujlwm nrog lawv tus kheej qhov tseeb. Qhov no ua rau muaj kev ntxhov siab ntau vim tib neeg pom tias USB-rau-Serial txuas hniav tsis ua haujlwm ntxiv lawm. Tam sim no ib hnub kuv tsuas yog lo rau CH340 raws li USB-rau-Serial txuas hniav kom tsis txhob yuav cov laug cam uas yuav lossis tsis ua haujlwm. Hauv txhua qhov xwm txheej koj yuav tsum tau nrhiav thiab teeb tsa tus tsav tsheb raug rau tus choj txuas siv ntawm koj lub rooj tsavxwm. Nov yog qhov txuas mus rau lub vev xaib raug cai rau tus tsav tsheb CH340; CH341SER_EXE.
ESP8266 tsis muaj kev mob siab rau I2C kho vajtse. Txhua tus neeg tsav tsheb I2C rau ESP8266 yog ua raws me ntsis-tsoo. Ib qho zoo dua ESP8266 I2C cov tsev qiv ntawv yog brzo_I2C lub tsev qiv ntawv. Nws tau sau ua lus sib dhos rau ESP8266 kom ua kom sai li sai tau. Lub tsev qiv ntawv OLED zaub kuv siv siv lub tsev qiv ntawv brzo_I2C. Kuv ntxiv cov cai nkag mus rau BME280 sensor array siv lub tsev qiv ntawv brzo_I2C.
Koj tuaj yeem tau txais lub tsev qiv ntawv OLED ntawm no: ESP8288-OLED-SSD1306 Library.
Koj tuaj yeem tau txais lub tsev qiv ntawv brzo_I2C ntawm no: Brzo_I2C Library.
Ob lub tsev qiv ntawv yuav tsum tau teeb tsa hauv koj Arduino IDE. Arduino lub vev xaib muaj cov lus qhia yuav ua li cas rau nruab zip cov tsev qiv ntawv rau hauv IDE ntawm no: Yuav Ua Li Cas Nruab Zip Cov Tsev Qhua.
Tswv yim: Tom qab txhim kho ESP8266 cov laug cam pob thiab cov tsev qiv ntawv, kaw Arduino IDE thiab rov qhib nws. Qhov no yuav ua kom ntseeg tau tias ESP8266 cov laug cam thiab cov tsev qiv ntawv yuav nthuav tawm hauv IDE.
Kauj Ruam 12: Xaiv Koj Pawg Thawj Coj:
Qhib Arduino IDE. Yog tias koj tseem tsis tau ua tiav, teeb tsa ESP8266 addon, brzo_i2c lub tsev qiv ntawv thiab lub tsev qiv ntawv tsav tsheb OLED.
Nyem rau ntawm "Cov cuab yeej" nyob rau sab saum toj ntawv qhia zaub mov bar. Scroll cia cov ntawv qhia zaub mov nco rau qhov uas nws hais tias "Board:". Xaub hla mus rau "Tus Thawj Saib Xyuas Haujlwm" nco cov ntawv qhia zaub mov thiab nqes mus rau; "NodeMCU 1.0 (ESP-12E Module)". Nyem rau nws xaiv nws. Tawm tag nrho lwm qhov chaw ntawm lawv qhov txiaj ntsig.
Kauj Ruam 13: Xaiv Serial Port:
Nyem rau ntawm "Cov cuab yeej" nyob rau sab saum toj ntawv qhia zaub mov bar. Scroll cia cov ntawv qhia zaub mov nco rau qhov uas nws hais "Port". Xaiv qhov chaw nres nkoj uas tsim nyog rau koj lub khoos phis tawj. Yog tias koj qhov chaw nres nkoj tsis tshwm, koj lub rooj tsav xwm tsis tau ntsaws lossis koj tsis tau thauj tus tsav tsheb rau koj tus choj txuas lossis koj lub rooj tsav xwm tsis tau ntsaws thaum koj qhib Arduino IDE. Kev kho yooj yim yog kaw Arduino IDE, ntsaws rau hauv koj lub rooj tsavxwm, thauj cov tsav tsheb uas ploj lawm rov qhib Arduino IDE.
Kauj Ruam 14: WeatherStation.ino
Koj tuaj yeem siv qhov rub tawm khawm saum toj no lossis ua raws qhov txuas no mus rau GitHub kom tau txais qhov chaws; ESP8266-Huab Cua-Chaw Nres Tsheb.
Cov ntaub ntawv WeatherStation.ino thiab BME280.h yuav tsum nyob hauv tib daim ntawv. Lub npe nplaub tshev yuav tsum sib phim lub npe.ino cov ntaub ntawv (tsis muaj.ino txuas ntxiv). Nov yog qhov xav tau ntawm Arduino.
Kauj ruam 15: Kho WeatherStation.ino
Nyem rau "File" nyob rau sab saum toj ntawm cov ntawv qhia zaub mov. Nyem rau "Qhib". Hauv Cov Ntaub Ntawv Qhib dialog box nrhiav cov ntawv WeatherStation thiab xaiv nws. Koj yuav tsum pom ob lub tab, ib qho rau WeatherStation thiab ib qho rau BME280.h. Yog tias koj tsis muaj ob lub tab ces koj qhib lub nplaub tshev tsis raug lossis koj tsis tau rub tawm ob daim ntawv lossis koj tsis khaws lawv rau hauv daim nplaub tshev raug. Sim dua
Koj yuav tsum tau hloov kho WeatherStation.ino cov ntawv txhawm rau ntxiv SSID thiab tus lej zais rau koj li WiFi network. saib ib ncig kab 62 rau cov hauv qab no;
// muab SSID thiab tus password rau koj lub network WiFi ntawm no
const char* ssid = "yourssid"; const char* password = "password";
Hloov "yourssid" nrog SSID ntawm koj li WiFi network.
Hloov "tus lej" nrog tus lej hla rau koj li WiFi network.
Koj tseem yuav xav tau ntxiv koj tus lej OpenWeatherMap thiab tus lej zip uas koj nyob. Saib ib ncig kab 66 rau cov hauv qab no;
// muab koj tus lej OpenWeatherMap.com thiab tus lej zip ntawm no
const char* owmkey = "koj tus phooj ywg"; const char* owmzip = "yourzip, lub tebchaws";
Hloov "koj tus lej" nrog tus yuam sij tau txais los ntawm OpenWeatherMap.org.
Hloov "yourzip, lub tebchaws" nrog koj tus lej zip thiab lub tebchaws. Koj tus lej zip yuav tsum ua raws tus lej thiab koj lub tebchaws ("10001, peb").
Tom ntej no koj yuav tsum teeb tsa koj lub sijhawm nyob thiab pab/lov tes taw lub sijhawm txuag hnub nruab hnub (DST). Saib ib ncig kab 85 rau cov hauv qab no;
// Lub sij hawm nyoos rov qab yog hauv vib nas this txij xyoo 1970. Txhawm rau kho rau lub sijhawm hauv cheeb tsam rho tawm
// tus naj npawb ntawm vib nas this sib txawv rau koj lub sijhawm. Tus nqi tsis zoo yuav // rho sijhawm, tus nqi zoo yuav ntxiv sijhawm #define TZ_EASTERN -18000 // tus lej ntawm tsib feeb hauv tsib teev #define TZ_CENTRAL -14400 // tus lej ntawm plaub teev #define TZ_MOUTAIN -10800 // tus lej ntawm vib nas this peb teev #define TZ_PACIFIC -7200 // tus lej thib ob hauv ob teev
// Kho lub sijhawm rau koj thaj tsam sijhawm los ntawm kev hloov TZ_EASTERN mus rau ib qho ntawm lwm qhov txiaj ntsig.
#define TIMEZONE TZ_EASTERN // hloov qhov no rau koj lub sijhawm
Muaj ib pab pawg #define nqe lus uas piav qhia lub sijhawm offset rau ntau thaj tsam sijhawm. Yog tias koj lub sijhawm nyob ntawd hloov "TZ_EASTERN" hauv "TIMEZONE" txhais. Yog tias koj lub sijhawm nyob hauv cheeb tsam tsis tau teev npe koj yuav tsum tsim ib qho. NTP server muab sijhawm raws li Greenwich Mean Time. Koj yuav tsum ntxiv lossis rho tawm qee cov xuaj moos (hauv vib nas this) kom tuaj txog ntawm koj lub sijhawm. Tsuas yog luam ib qho ntawm "#define TZ_XXX" nqe lus tom qab ntawd hloov lub npe thiab tus lej thib ob. Tom qab ntawd hloov "TZ_EASTERN" rau koj lub sijhawm tshiab.
Koj kuj tseem yuav tsum txiav txim siab siv Hnub Ci Txuag lub sijhawm lossis tsis yog. Txhawm rau lov tes taw DST, hloov qhov "1" nrog "0" hauv kab hauv qab no;
#define DST 1 // teeb tsa rau 0 txhawm rau cuam tshuam lub sijhawm txuag hnub ci
Thaum qhib, DST yuav cia li nce lossis ncua lub sijhawm los ntawm ib teev thaum tsim nyog.
Kauj Ruam 16: Tshaj Tawm Txoj Cai rau Koj Tus ESP8266
Nyem rau ntawm txoj cai ncig lub ntsej muag xub qhia lub cim uas nyob hauv qab no "Kho kom raug" hauv cov ntawv qhia zaub mov saum toj kawg nkaus. Qhov no yuav suav cov lej thiab xa nws mus rau koj lub rooj tsavxwm. Yog tias txhua yam suav sau thiab xa mus kom raug, tom qab ob peb feeb, OLED cov duab yuav tsum pom thiab cov lus sib txuas yuav tsum tshwm.
Kauj Ruam 17: Yuav Ua Li Cas Saib Huab Cua Cov Ntaub Ntawv Lub Vev Xaib
Daim duab saum toj no qhia lub vev xaib uas tau txais los ntawm Lub Chaw Huab Cua. Koj tuaj yeem nkag nws siv koj lub PC, xov tooj lossis ntsiav tshuaj. Tsuas yog qhib lub browser thiab ntaus tus IP chaw nyob ntawm Lub Chaw Huab Cua raws li qhov URL. Tus IP chaw nyob ntawm Chaw Saib Xyuas Huab Cua tau tshwm rau ntawm ib qho ntawm cov ntxaij vab tshaus ntawm Chaw Saib Xyuas Huab Cua. Nyem Refresh Page los hloov cov ntaub ntawv.
Kauj Ruam 18: Ua kev zoo siab, Koj Ua Tiav lawm
Qhov ntawd yog nws. Tam sim no koj yuav tsum muaj Chaw Ua Haujlwm Huab Cua. Koj cov kauj ruam tom ntej yuav yog tsim thiab ua rooj plaub los tsev koj Lub Chaw Huab Cua. Lossis tej zaum koj xav ntxiv ob peb lub ntxaij vab tshaus los qhia cua txias, dej lwg taw tes, hnub tuaj lossis hnub poob hnub poob lossis teeb duab ntawm kev ntsuas ntsuas ntsuas barometric lossis kwv yees huab cua siv qhov ntsuas siab. Muaj kev lom zem thiab txaus siab.
Pom zoo:
PyonAir - Qhib Qhov Chaw Huab Cua Huab Cua Pollution: 10 Cov Kauj Ruam (nrog Duab)
PyonAir - Qhib Qhov Chaw Huab Cua Pollution: PyonAir yog tus nqi qis rau kev saib xyuas cov pa phem hauv cheeb tsam - tshwj xeeb, muaj teeb meem me me. Raws li nyob ib puag ncig Pycom LoPy4 lub rooj tsavxwm thiab Grove-sib xws kho vajtse, lub kaw lus tuaj yeem xa cov ntaub ntawv hla LoRa thiab WiFi. Kuv lees paub qhov no
Huab Cua Huab Cua Huab Cua: 11 Kauj Ruam (nrog Duab)
Huab Cua Huab Cua Huab Cua: Txoj haujlwm no ua rau huab cua huab siv Raspberry Pi Zero W. Nws txuas rau Yahoo Huab Cua API thiab nyob ntawm qhov kev kwv yees rau hnub tom ntej hloov xim. Kuv tau tshoov siab los ntawm Wisconsin Gas Building uas muaj nplaim taws ntawm lub ru tsev uas hloov pauv
Qhov kawg Qhov Siab Tshaj Plaws Huab Cua Huab Cua Cov Ntaub Ntawv Logger: 9 Kauj Ruam (nrog Duab)
Qhov kawg High Altitude Weather Balloon Data Logger: Sau cov ntaub ntawv huab cua huab cua siab nrog qhov kawg qhov siab tshaj plaws huab cua zais zais cov ntaub ntawv logger. Lub zais pa huab cua siab, tseem hu ua lub zais pa siab lossis HAB, yog lub zais pa loj loj uas muaj cov helium. Cov balloons no yog lub platform
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Huab Cua Huab Cua: 7 Cov Kauj Ruam (nrog Duab)
HRV (Lub Tsev Huab Cua Hloov Chaw) Arduino Tus Tswj Nrog Air Economizer: HRV Arduino Tus Tswj Nrog Air Economizer Yog li kuv keeb kwm nrog txoj haujlwm no yog kuv nyob hauv Minnesota thiab kuv lub rooj tsav xwm hluav taws xob kib ntawm kuv LifeBreath 155Max HRV. Kuv tsis xav them $ 200 rau qhov tshiab Kuv ib txwm xav tau qee yam nrog kev lag luam huab cua kev ua txhaum
Acurite 5 in 1 Weather Station Siv Raspberry Pi thiab Weewx (lwm Cov Chaw Huab Cua Tau Tshaj): 5 Cov Kauj Ruam (nrog Duab)
Acurite 5 in 1 Weather Station Siv Raspberry Pi thiab Weewx (lwm Lub Chaw Huab Cua Puas Tau Tshaj): Thaum kuv tau yuav Acurite 5 hauv 1 lub chaw nres tsheb huab cua Kuv xav kom tuaj yeem tshawb xyuas huab cua ntawm kuv lub tsev thaum kuv nyob deb. Thaum kuv los txog tsev thiab teeb tsa kuv pom tias kuv yuav tsum muaj cov khoom txuas nrog lub khoos phis tawj lossis yuav lawv lub hauv paus ntse