Cov txheej txheem:

Tswj Cov Khoom Siv Hauv Tsev Siv NodeMCU (ESP8266) thiab Blynk App: 8 Kauj Ruam (nrog Duab)
Tswj Cov Khoom Siv Hauv Tsev Siv NodeMCU (ESP8266) thiab Blynk App: 8 Kauj Ruam (nrog Duab)

Video: Tswj Cov Khoom Siv Hauv Tsev Siv NodeMCU (ESP8266) thiab Blynk App: 8 Kauj Ruam (nrog Duab)

Video: Tswj Cov Khoom Siv Hauv Tsev Siv NodeMCU (ESP8266) thiab Blynk App: 8 Kauj Ruam (nrog Duab)
Video: Tus Cawm Seej Hloov Neeg Txoj Hmoo (HD) 2024, Hlis ntuj nqeg
Anonim
Tswj Cov Khoom Siv Hauv Tsev Siv NodeMCU (ESP8266) thiab Blynk App
Tswj Cov Khoom Siv Hauv Tsev Siv NodeMCU (ESP8266) thiab Blynk App

Hauv qhov kev qhia no, peb yuav kawm paub siv Blynk app thiab NodeMCU (ESP8266) txhawm rau txhawm rau tswj teeb (lwm yam khoom siv hauv tsev yuav zoo xwb), kev sib txuas yuav dhau los ntawm internet.

Lub hom phiaj ntawm cov lus qhia no yog los qhia cov kev daws teeb meem yooj yim tshaj plaws tswj hwm koj li Arduino lossis kho vajtse sib xws (NodeMCU) hauv Is Taws Nem thiab tshawb fawb ntiaj teb ntawm Internet Ntawm Yam (IoT).

Blynk yog dab tsi? Blynk yog Platform nrog iOS thiab Android apps los tswj Arduino, Raspberry Pi thiab cov nyiam hauv Internet. Nws yog lub digital dashboard uas koj tuaj yeem tsim cov duab nraaj rau koj txoj haujlwm los ntawm kev yooj yim rub thiab xa cov cuab yeej. (Source: Blynk lub vev xaib).

Kauj Ruam 1: Khoom Kho Vajtse/Software

Cov Khoom Kho Vajtse/Software
Cov Khoom Kho Vajtse/Software
Cov Khoom Kho Vajtse/Software
Cov Khoom Kho Vajtse/Software

Cov khoom siv kho vajtse:

1. NodeMCU (ESP8266).

2. Relay

3. Teeb

4. Cov xov hlau

6. 5V Cov Khoom Siv Hluav Taws Xob 1AMP (xaiv tau tab sis kuv pom zoo kom siv nws txhawm rau txhawm rau zam kev tsis muaj hluav taws xob tam sim no los ntawm kev muab 5v rau kev xa tawm.

Cov software software:

1. Blynk App

2. Arduino IDE

3. Blynk Library rau koj li OS (Windows, Linux, iOS)

4. ESP8266 Tus Thawj Saib Xyuas Haujlwm rau Arduino IDE

Kauj ruam 2: Rub tawm Blynk Library

Ua raws li cov lus qhia:

1. Rub tawm Blynk_Release_vXX.zip (nqes mus rau ntu Downloads)

2. Unzip cov ntawv khaws tseg. Koj yuav pom tias cov ntawv khaws cia muaj ob peb cov ntawv thiab ntau lub tsev qiv ntawv.

3. Luam tag nrho cov tsev qiv ntawv no rau koj_sketchbook_folder ntawm Arduino IDE. Txhawm rau nrhiav qhov chaw ntawm koj_sketchbook_folder, mus rau saum cov ntawv qhia zaub mov hauv Arduino IDE:

Windows: Cov ntaub ntawv f Nyiam

Mac OS: Arduino → Nyiam

Txhawm rau rub tawm Blynk Library thiab tau txais cov ntaub ntawv ntau ntxiv ua raws qhov txuas no (ntawm no).

Kauj Ruam 3: Ntxiv ESP8266 Tus Thawj Saib Xyuas Haujlwm

Ntxiv ESP8266 Tus Thawj Saib Xyuas Haujlwm
Ntxiv ESP8266 Tus Thawj Saib Xyuas Haujlwm

Hauv Tus Thawj Saib Xyuas Ntxiv Ntxiv rau hauv qab URL.https://arduino.esp8266.com/versions/2.4.0/package_esp8266com_index.json

Raws li tau hais tseg hauv daim duab thiab nkag mus OK.

Nco tseg: Kom tau txais xov xwm ntau ntxiv txog cov kauj ruam no saib cov vis dis aus

Kauj Ruam 4: Saib Yeeb Yaj Kiab kom paub meej ntxiv

Image
Image

Kauj Ruam 5: Blynk Txoj Kev Kho

Blynk Txoj Kev Kho
Blynk Txoj Kev Kho
Blynk Txoj Kev Kho
Blynk Txoj Kev Kho
Blynk Txoj Kev Kho
Blynk Txoj Kev Kho

Txhawm rau teeb tsa Blynk App, koj yuav tsum ua raws cov theem hauv qab no:

1. Rub tawm Blynk app ntawm koj lub smartphone thiab tsim ib tus as khauj.

Txhawm rau ua qhov no: Rub tawm Blynk apps:

• iOS:

• Hauv:

2. Tsim txoj haujlwm tshiab, xaiv los ntawm cov npe koj cov cuab yeej (NodeMCU).

3. Xaiv hom kev sib txuas (USB, Wifi, Bluetooth …).

4. Ntxiv tus widget rau koj lub vaj huam sib luag tswj los ntawm txhaj rau lub cim ntxiv rau sab xis saum toj.

5. Xaiv lub khawm widget, thiab ob npaug nias rau nws txhawm rau kho nws cov chaw.

Nco tseg: tus yuam sij kev lees paub tau xa mus rau koj tus email

Kauj ruam 6: Schematic

Schematic
Schematic

Ua siab zoo ua raws cov theem hauv qab no:

1. Lub 5v ntawm lub hwj chim muab rau Vcc ntawm pawg thawj coj saib xyuas.

2. Tus GND mus rau GND ntawm pawg thawj coj saib xyuas.

3. D1 ntawm NodeMCU mus rau IN1 ntawm pawg thawj coj saib xyuas.

Nco tseg: Kev xa rov qab yuav tsum tau 5v thiab tso tawm ntawm nodemcu tsuas yog 3.3v qhov no yog vim li cas kuv thiaj pom zoo kom siv sab nraud 5v fais fab mov

Kauj Ruam 7: Arduino Code

Txog txoj cai

#define BLYNK_PRINT Serial

#suav nrog #suav nrog /// Koj yuav tsum tau txais Auth Token hauv Blynk App. // Mus rau Qhov Chaw Haujlwm (icon txiv ntoo). char auth = "YourAuthToken"; // Koj li ntawv pov thawj WiFi. // Teeb tus password rau "" rau qhib tes hauj lwm. char ssid = "YourNetworkName"; char pass = "YourPassword"; void teeb () {// Debug console Serial.begin (115200); Blynk.begin (auth, ssid, dhau); } tsis muaj dab tsi voj () {Blynk.run (); }

Kauj Ruam 8: Rau Kev Txhawb Nqa

Kev Txhawb Nqa
Kev Txhawb Nqa

Koj tuaj yeem sau npe yuav rau kuv li YouTube channel rau kev qhia ntau ntxiv thiab phiaj xwm.

Sau npe yuav txhawb nqa.

Ua tsaug. Mus rau kuv tus YouTube Channel -link

Pom zoo: