Cov txheej txheem:

Xa Kub & Vaum rau Blynk App (Wemos D1 Mini Pro): 15 Kauj Ruam (nrog Duab)
Xa Kub & Vaum rau Blynk App (Wemos D1 Mini Pro): 15 Kauj Ruam (nrog Duab)

Video: Xa Kub & Vaum rau Blynk App (Wemos D1 Mini Pro): 15 Kauj Ruam (nrog Duab)

Video: Xa Kub & Vaum rau Blynk App (Wemos D1 Mini Pro): 15 Kauj Ruam (nrog Duab)
Video: Xav ua kom hluas nkauj nyiam -Dav kub & Npauj kub xyooj Cover 2023 2024, Hlis ntuj nqeg
Anonim
Xa Kub & Vaum rau Blynk App (Wemos D1 Mini Pro)
Xa Kub & Vaum rau Blynk App (Wemos D1 Mini Pro)

Cov Lus Qhia no saib ntawm kev siv Wemos D1 Mini Pro xa datta (Kub & Vaum) mus rau Blynk APP.

Kauj ruam 1: Pib

Pib Pib
Pib Pib

Peb yuav tau txais qhov ntsuas kub thiab av noo thawb rau koj Blynk App ntawm koj lub xov tooj. Txuas tus LED raws li qhia ntawm no: Nco tseg. Kuv tau siv xiav DHT11 Digital Temperature/Humidity module uas muaj peb tus pin. Tus qauv yog los ntawm Banggood. Lwm cov qauv zoo sib xws los ntawm cov neeg muab khoom sib txawv tuaj yeem muaj tus lej sib txawv. Xyuas qhov no. Cov xim hauv qab no raug rau Banggood module:

Xiav = Cov ntaub ntawv teeb liab (sab laug)

Liab = Vcc +5v (nruab nrab)

Dub = av (txoj cai)

Kauj ruam 2: Tseem ceeb

Tseem ceeb
Tseem ceeb

Raws li tau hais los saum no.

Nco tseg. Kuv siv xiav DHT11 Digital Temperature/Humidity module los ntawm Banggood uas muaj peb tus pin. Lwm cov qauv zoo sib xws los ntawm cov neeg muab khoom sib txawv tuaj yeem muaj tus lej sib txawv. Xyuas qhov no. Cov xim raug rau Banggood module:

Xiav = Cov ntaub ntawv teeb liab (sab laug) Liab = Vcc +5v (nruab nrab) Dub = Hauv av (txoj cai)

Kauj Ruam 3: Pib Nrog Blynk App

Pib Pib Nrog Blynk App
Pib Pib Nrog Blynk App

Tsim tus account Blynk Tom qab koj rub tawm Blynk App, koj yuav tsum tsim tus lej Blynk tshiab. Tus lej no yog cais los ntawm tus as khauj siv rau Blynk Forums, yog tias koj twb muaj lawm. Peb pom zoo siv email chaw nyob tiag vim nws yuav yooj yim dua tom qab.

Vim li cas kuv thiaj yuav tsum tsim tus as khauj? Ib tus account xav tau los cawm koj cov phiaj xwm thiab muaj kev nkag tau los ntawm ntau yam khoom siv los ntawm txhua qhov chaw. Nws tseem yog kev ntsuas kev nyab xeeb. Koj ib txwm tuaj yeem teeb tsa koj tus kheej Blynk Server (Txuas mus rau lwm qhov chaw.) Txuas mus rau lwm qhov chaw. thiab muaj kev tswj hwm tag nrho.

Kauj Ruam 4: Tsim Txoj Haujlwm Tshiab

Tsim Txoj Haujlwm Tshiab
Tsim Txoj Haujlwm Tshiab

Tom qab koj tau ua tiav nkag mus rau koj tus as khauj, pib los ntawm kev tsim ib qhov haujlwm tshiab.

Kauj Ruam 5: Npe/Pawg Thawj Coj/Kev Sib Txuas

Npe/Pawg Thawj Coj/Kev Sib Txuas
Npe/Pawg Thawj Coj/Kev Sib Txuas

Muab nws lub npe thiab xaiv pawg tsim nyog (Wemos D1 Mini). Tam sim no nyem tsim.

Kauj Ruam 6: Kev lees paub tseeb

Kev lees paub tseeb
Kev lees paub tseeb

Koj daim ntawv pov thawj kev lees paub yuav raug email rau koj thiab koj tseem yuav tuaj yeem nkag mus rau nws hauv qhov chaw ntawm koj qhov project. Tus lej tshiab yuav raug tsim rau txhua qhov haujlwm koj tsim.

Kauj Ruam 7: Ntxiv Ob Qhov Widgets (Tus Nqi Zaub)

Ntxiv Ob Widgets (Tus Nqi Zaub)
Ntxiv Ob Widgets (Tus Nqi Zaub)

Koj qhov project canvas tsis muaj dab tsi, cia peb ntxiv ob lub vijtsam los qhia qhov kub thiab txias. Coj mus rhaub qhov twg ntawm daim ntaub kom qhib lub thawv widget. Txhua qhov khoom siv muaj nyob ntawm no.

Kauj ruam 8: Drag N Drop

Luag N Drop
Luag N Drop

Drag-n-Drop-Coj mus rhaub thiab tuav lub Widget kom rub nws mus rau txoj haujlwm tshiab.

Kauj Ruam 9: Vaum

Vaum
Vaum

Cov Chaw Cuam Tshuam - Txhua Tus Widget muaj nws tus kheej teeb tsa. Coj mus rhaub ntawm tus widget kom tau mus rau lawv. Teeb lawv nrog cov teeb tsa hauv qab no.

Kauj Ruam 10: Kub

Kub
Kub

Cov Chaw Cuam Tshuam - Txhua Tus Widget muaj nws tus kheej teeb tsa. Coj mus rhaub ntawm tus widget kom tau mus rau lawv. Teeb lawv nrog cov teeb tsa hauv qab no.

Kauj ruam 11: Khiav qhov Project

Khiav Txoj Haujlwm
Khiav Txoj Haujlwm

Kauj ruam 12: Khiav Code

Khiav Txoj Cai
Khiav Txoj Cai

Tam sim no cia saib qhov piv txwv piv txwv rau Wemos D1 Mini Pro. Daim ntawv ceeb toom muaj peb ntu tseem ceeb uas koj yuav tsum suav nrog:

1. char auth = ""; Tshwj xeeb rau koj txoj haujlwm (Blynk App).

2. char ssid = ""; Tshwj xeeb rau lub network uas peb txuas nrog (lub npe network). Koj tuaj yeem "hotspot" los ntawm koj lub xov tooj thiab.

3. char pass = ""; Tshwj xeeb rau lub network peb txuas rau (password).

CODE

#define BLYNK_PRINT Serial

#include #include #include // Koj yuav tsum tau txais Auth Token hauv Blynk App. // Mus rau Qhov Chaw Haujlwm (icon txiv ntoo). char auth = ""; // Koj li ntawv pov thawj WiFi. // Teeb tus password rau "" rau qhib tes hauj lwm. char ssid = ""; char pass = ""; #define DHTPIN D4 // Tus lej digital dab tsi peb txuas nrog #define DHTTYPE DHT11 // DHT 11

DHT dht (DHTPIN, DHTTYPE);

BlynkTimer timer; ploj t; ploj h; void teeb () {// Debug console Serial.begin (9600); Blynk.begin (auth, ssid, dhau); dht.begin (); timer.setInterval (1000L, sendSensor); } tsis muaj dab tsi voj () {Blynk.run (); timer.run (); } // Lub luag haujlwm no xa Arduino lub sijhawm txhua txhua ob rau Virtual Pin (5). // Hauv app, Widget's nyeem zaus yuav tsum tau teeb tsa rau PUSH. Qhov no txhais tau tias // uas koj txheeb xyuas ntau npaum li cas xa cov ntaub ntawv mus rau Blynk App. void sendSensor () {h = dht.readHumidity (); t = dht.readTemperature (); // lossis dht.readTemperature (tseeb) rau Fahrenheit // l = analogRead (LDR); yog (isnan (h) || isnan (t)) {Serial.println ("Ua tsis tau tejyam nyeem los ntawm DHT sensor!"); rov qab; } // Koj tuaj yeem xa tus nqi txhua lub sijhawm. // Thov tsis txhob xa ntau tshaj 10 qhov nqi ib pliag. Blynk.virtualWrite (V5, h); Blynk.virtualWrite (V6, t); }

Kauj Ruam 13: Zaub

Zaub
Zaub

Rov qab mus rau Blynk App thiab tshawb xyuas koj cov zaub. Koj yuav tsum pom qhov kub thiab txias tam sim no.

Pom zoo: