Cov txheej txheem:

2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev: 7 Kauj Ruam
2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev: 7 Kauj Ruam

Video: 2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev: 7 Kauj Ruam

Video: 2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev: 7 Kauj Ruam
Video: Weather Station: DHT11 Temperature and Humidity Sensor Arduino 2.4″ TFT LCD Touch Shield - SPFD5408 2024, Kaum ib hlis
Anonim
2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev
2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev
2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev
2.4 TFT Arduino Weather Station Nrog Ntau Lub Cev

Lub chaw nres tsheb huab cua Arduino nqa nrog TFT LCD thiab ob peb lub ntsuas.

Kauj Ruam 1: Zaj Dab Neeg

Tsis ntev los no kuv muaj sijhawm me ntsis los ua si nrog arduino.

Pom cov duab kos hauv is taws nem ob peb hlis dhau los nrog TFT LCD nrog DHT sensor thiab RTC. Yog li kuv tau txuas nws, ua qee qhov kev hloov kho kom kos duab ua haujlwm. Tom qab rub tawm nws tau ua haujlwm txaus ntshai !! Yog li tom qab 4 teev kuv pom nws tsis muaj txiaj ntsig los raug kev txom nyem nrog nws. Kuv xav tias kuv yuav ua chaw nres tsheb huab cua rau kuv tus kheej uas kuv yuav siv hauv kuv lub tsev.

Cia peb pib!

Kauj Ruam 2: Qhov Yuav Tsum Tau

Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau
Qhov Yuav Tsum Tau

Qhov xav tau:

- Arduino uno lossis Mega2560 (twb muaj lawm)

- 2.4 tft lcd nrog Ili932x lossis 9341 IC (twb muaj lawm)

- DHT11 (twb muaj lawm)

DS18b20 (twb muaj lawm)

- 4 tus pin lub teeb sensor LDR (analog thiab digital)

- Qee lub xov hlau jumper (twb muaj lawm)

- Arduino IDE thiab cov tsev qiv ntawv raug

Yog li lub sijhawm no nws tsis raug nqi rau kuv.

Kauj Ruam 3: Teeb Kho Vajtse

Kho vajtse teeb
Kho vajtse teeb

Zoo nws tsis muaj teeb meem loj. Suav cov pob zeb Arduino tsis yog ib txwm phem. Thaum lub rooj tsavxwm muaj kab thib ob uas koj tuaj yeem muab cov laug txuas, uas ua rau qhov chaw txav me ntsis ntxiv nrog cov hlua.

Yog li kuv tau siv cov pins ntawm txoj kev rov qab (saib qis) kom ua haujlwm yooj yim dua. Saib daim duab.

Lub sijhawm no peb tau txais 3 5V, 3 3.3 V thiab ob peb ntawm GND pins.

Tam sim no koj tuaj yeem txuas ntau lub ntsuas hluav taws xob rau lub rooj tsavxwm li no.

DHT sensor txuas nrog Digital 11.

Kub sensor txuas nrog Digital 10.

LDR txuas nrog Analog 5.

Digital 12 thiab 13 yog pub dawb. Yog li koj tseem tuaj yeem ntxiv 1 lub sensor yog tias koj xav tau. (Kuv xav tau)

Vim tias lub LCD tsis muaj I2C cov cim tuaj yeem txuas nrog lub rooj tsavxwm. Lcd xav tau A4 tus pin rau RESET.

Tu siab, tab sis muaj tseeb.

Kauj ruam 4: Software

Download tau cov tsev qiv ntawv thiab cov duab kos.

Kuv tab tom xa cov tsev qiv ntawv rau qhov haujlwm no.

Lub tsev qiv ntawv SPFD5408 zoo heev los tsav peb 2.4 TFT lcd, tab sis kuv xav tias nws tsuas yog zoo rau ILI932X; 9340; 9341 ib.

2019.01.05.!!

Hloov kho me me! Tam sim no Arduino tab tom nthuav tawm lub lwg taw tes!

Qhov ntsuas cua sov tau tshwm sim ob qho tib si Celsius thiab Fahrenheit.

2019.01.06!!

Tam sim no Mcufriend version tau tshaj tawm qhov txiaj ntsig rau Serial monitor.

Kauj Ruam 5: Cia Saib Dab Tsi Peb Tau Ua

Cia Saib Dab Tsi Peb Tau Ua
Cia Saib Dab Tsi Peb Tau Ua
Cia Saib Dab Tsi Peb Tau Ua
Cia Saib Dab Tsi Peb Tau Ua
Cia Saib Dab Tsi Peb Tau Ua
Cia Saib Dab Tsi Peb Tau Ua

Peb Arduino yog kawm tiav qhov txiaj ntsig los ntawm cov ntsuas nrog 1000ms hloov pauv tus nqi.

Peb pom dab tsi:

- Qhov ntsuas kub los ntawm DHT sensor hauv lub ntsuas cua

- Vaum ntawm kaum sab xis

- Kub los ntawm tus ntsuas DS18B20

- Cov ntsuas cua sov hauv Fahrenheit

- Lub teeb siv nyob rau hauv feem pua (tseem me ntsis kab laum)

- Kub hauv Fahrenheit

-Qhov taw tes hauv Celsius

- Tsis suav cov av noo

Tab sis! Peb tseem muaj 2 tus lej digital pub dawb, yog li tseem muaj chav rau kev txhim kho me ntsis kom muaj peev xwm tshaj plaws ntawm peb pawg Arduino.

Kuv tab tom npaj ob peb (thiab pom) hloov kho rau qhov chaw huab cua no yav tom ntej kom nws ua haujlwm thiab zoo dua. Sai li kuv muaj sijhawm txaus txaus ntawm chav kawm ……

Qhov thib 3 yog rau McuFriend tau tshaj tawm cov lus. Kuv muaj 1580 thiab 5408 IC tsav tsheb uas kuv tsis tau siv yuav luag 2 xyoos. Yog li kuv tau hloov kho qee yam los ua haujlwm nrog lawv. Kuv upload kuv lub tsev qiv ntawv McuFriend hloov kho.

Kauj Ruam 6: Sib Sau Yuam Kev

Sau yuam kev
Sau yuam kev
Sau yuam kev
Sau yuam kev

Tsis ntev los no kuv tab tom suav sau yuam kev nrog Arduino IDE (thiab tsis yog kuv nkaus xwb). Qhov no feem ntau yog teeb meem rov qab los.

Yog tias koj muaj qhov suav sau yuam kev nrog daim duab no thov luam nws tawm mus rau Arduino qhov tshiab thiab sim dua.

Qhov no ua haujlwm rau kuv, vam tias nws yuav ua rau koj ib yam nkaus.

Vim yog ESP Core kuv tseem zaum ntawm Arduino IDE 1.6.13.

Vim li cas ho tsis hloov kho? Tsuas yog vim qhov version no yooj yim heev rau kuv.

Kauj ruam 7: Ua tiav

Koj ua tiav.

Siv nws li koj nyiam.

Ua tsaug rau kev nyeem kuv cov lus qhia.

Pom zoo: