Cov txheej txheem:

Tswj Arduino Uno Siv ESP8266 WiFi Module thiab Blynk App: 6 Cov Kauj Ruam
Tswj Arduino Uno Siv ESP8266 WiFi Module thiab Blynk App: 6 Cov Kauj Ruam

Video: Tswj Arduino Uno Siv ESP8266 WiFi Module thiab Blynk App: 6 Cov Kauj Ruam

Video: Tswj Arduino Uno Siv ESP8266 WiFi Module thiab Blynk App: 6 Cov Kauj Ruam
Video: PIR motion sensor | How do they Work? 2024, Kaum ib hlis
Anonim
Tswj Arduino Uno Siv ESP8266 WiFi Module thiab Blynk App
Tswj Arduino Uno Siv ESP8266 WiFi Module thiab Blynk App

Txoj haujlwm no ua rau koj tswj hwm Arduino pins siv ESP8266-01 WiFi module thiab Blynk App. Blynk App siv tau yooj yim heev thiab yog txoj hauv kev zoo los pib kawm txog IoT.

Cov lus qhia no yog rau Windows PC

Kauj ruam 1: Sau txhua yam:

Sau txhua yam
Sau txhua yam
Sau txhua yam
Sau txhua yam
Sau txhua yam
Sau txhua yam
Sau txhua yam
Sau txhua yam

Kho vajtse:

Arduino Ib

Esp8266-01 WiFi Module

USB to TTL serial

3.3v qhov ntsuas hluav taws xob

Breadboard thiab Hlau.

Cov software:

Arduino IDE Cov

App ntawm Blynk

Cov no yog yam uas koj xav tau. Nco ntsoov tias koj muaj txhua yam hauv daim nplaub tshev ua ntej 1) Arduino IDE:

2) Blynk Libraries (hloov tshiab kawg):

3) ESP8266 cov cuab yeej flasher:

Kauj Ruam 2: Txhim Kho Arduino IDE thiab Cov Tsev Qiv Ntawv

Nruab qhov hloov tshiab kawg ntawm Arduino IDE.

Qhib Arduino IDE thiab mus rau cov ntaub ntawv-> nyiam-> hauv tus thawj tswj hwm ntxiv URL hom-https://arduino.esp8266.com/stable/package_esp8266…

Mus rau cov cuab yeej -> cov laug cam -> Tus Thawj Saib Xyuas Haujlwm thiab teeb tsa pob esp8266 pom thaum kawg. (yeem)

Tshem tawm cov ntaub ntawv blynk lub tsev qiv ntawv zip thiab luam cov ntsiab lus hauv cov ntawv tais ceev tseg hauv cov ntawv zip rau hauv -

cov neeg siv cov ntaub ntawv Arduino Libraries

Kauj Ruam 3: Flashing ESP8266 Firmware

Teeb nyem ESP8266 Firmware
Teeb nyem ESP8266 Firmware

Koj yuav tsum ua kom pom qhov Circuit Court txhawm rau txhawm rau teeb tsa lub firmware mus rau ESP8266:

Hauv ntau lub rooj sab laj kuv tau nyeem tias esp8266 tuaj yeem ua rau pom tau yam tsis siv FTDI usb rau ttl hloov pauv. Hloov chaw ntau tus neeg tau siv Arduino UNO los nyem qhov esp8266. Txawm li cas los xij los ntawm kuv tus kheej kev paub nws yog qhov zoo dua los yuav FTDI USB rau TTL hloov pauv/Cable raws li cov khoom siv arduino tsis ua haujlwm rau kuv (tej zaum yog vim muaj teeb meem fais fab)

Extract esp_flasher.zip thiab khiav daim ntawv thov XTCOM_UTIL.

Txuas Esp8266-01 mus rau lub khoos phis tawj los ntawm kab hluav taws xob. Koj yuav tsum paub txoj cai COM chaw nres nkoj uas yog siv rau kev sib txuas lus. mus rau tus thawj tswj ntaus ntawv thiab Nyem rau ntawm cov chaw nres nkoj (COM & LPT). Tom qab ntawd sau tseg qhov chaw nres nkoj COM siv los ntawm ESP8266-01.

Hauv XTCOM_UTIL mus rau toolsConfig Device thiab xaiv txoj cai com chaw nres nkoj thiab baud tus nqi li 9600. Nyem rau Qhib. Tom qab ntawd yog tias kev ua haujlwm tau ua tiav nyem rau Txuas. ces Esp8266 yuav txuas nrog. Yog tias koj ntsib qhov yuam kev ces tshem lub cable thiab ntxig dua.

Sab hauv cov ntawv esp_flasher.zip, koj yuav pom cov ntawv readme.txt uas muaj cov chaw nyob uas txhua tus.bin cov ntaub ntawv yuav tsum tau flashed. mus rau API Testflash Duab rub tawm. xauj cov ntaub ntawv raug.bin thiab nkag mus rau qhov chaw nyob sib xws rau hauv cov ntawv thiab nyem rau rub tawm.

piv txwv li: boot_v1.1.bin -------------- 0x00000

tom qab kev ua haujlwm tau ua tiav kaw XTCOM_UTIL thiab tseem tshem ESP8266 (qhov no yuav tsum tau ua nyob nruab nrab ntawm qhov flashing ntawm txhua.bin cov ntaub ntawv). Rov qhib dua XTCOM_UTIL thiab ntsaws Esp8266 thiab rov ua cov kauj ruam saum toj no kom nyem tag nrho 4 cov ntaub ntawv rau ntawm lawv qhov chaw nyob raug. (nco ntsoov rau hauv av GPIO0 txhua lub sijhawm thaum flashing)

Rau cov lus qhia ntxaws, thov xa mus rau qhov no:

Kauj ruam 4: Blynk App teeb tsa

Rub tawm Blynk App los ntawm Play Store thiab Kos Npe.

Txhawm rau Tsim Txoj Haujlwm Tshiab Nias + cim rau saum. Muab Koj Lub Npe Npe. Xaiv Ntaus li Arduino UNO Kev Sib Txuas Hom li WiFi thiab nias Tsim. Sai li sai tau thaum koj Tsim Tus Thawj Cim Token yuav raug xa mus rau koj li e-Mail uas tau sau npe. Koj kuj tseem tuaj yeem xa nws tom qab hauv koj Qhov Chaw Teeb Nplooj Ntawv (Txiv Ntoo Cim) Cov cuab yeej.

Txhawm rau ntxiv khawm nyem + thiab xaiv khawm. Nias lub khawm tsim tshiab los kho nws. Muab nws lub npe thiab teeb tus pin rau digital D13. Toggle hom rau SWITCH. Qhov no yuav tig ON/OFF IN-Built LED ntawm Arduino.

Txhawm rau tswj hwm lwm tus Pins, Xaiv Tus Pin Xav Tau (D3, D4 … lwm yam) hauv Khoos phis tawj ntawv qhia zaub mov.

Kauj ruam 5: Programming

Qhib Arduino IDE.

Xaiv pawg thawj coj mus rau Arduino Uno thiab xaiv qhov chaw nres nkoj raug.

DOWNLOAD CODE THIAB PASTE CODE Hauv Adruino IDE.

Nws yog qhov kev hloov kho ntawm Esp8266_Shield Piv Txwv Txoj Haujlwm. Rau qhov kojAUTH nrog tus cim cim cim xa rau koj li Mail. Hloov koj tus SSID nrog koj lub npe WiFi thiab hloov koj tus password nrog WiFi Password. Cov khoos phis tawj ib feem tau hais tawm raws li peb siv Arduino UNO.

** Hauv qhov programI tau hais tawm Software Serial (yog tias siv Arduino Uno). Kuv qhia koj kom tawm tswv yim Software Serial raws li nws tsis ruaj khov

Rub tawm cov haujlwm saum toj no mus rau Arduino Uno board. Lub tom qab nws tau rub tawm tshem tawm lub arduino los ntawm Computer.

Tam sim no koj yuav tsum txuas ESP8266 rau Arduino UNO.

Kauj Ruam 6: Teeb Circuit thiab FInish

Image
Image
Teeb tsa Circuit thiab FInish!
Teeb tsa Circuit thiab FInish!

ESP8266 Arduino

TX ------- Rx

Rx ---------- Txs

Gnd -------------- Gn

Vcc ------------ 3.3v

CH_PD ------------ 3.3v

Tom qab kev txuas tiav, ntsaws Arduino rau hauv lub khoos phis tawj. Qhib Serial Monitor thiab teeb tsa baud tus nqi rau 115200.

Yog tias Txhua Yam Yog Qhov Tseeb, hauv Serial Monitor koj yuav pom qee yam zoo li Duab Qhia.

Hauv Blynk App, xaiv koj qhov project thiab nyem lub pob ua si. Nias lub pob kom hloov ON/OFF LED.

Tam sim no nrog qhov haujlwm no tiav lawm. Cia siab tias koj nyiam nyeem ntawv. Yog tias koj muaj lus nug/ tswv yim pls tso nws hauv kab lus hauv qab no. Ua tsaug!

Pom zoo: