Cov txheej txheem:

Tus Nqi ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Me Me: 6 Cov Kauj Ruam (nrog Duab)
Tus Nqi ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Me Me: 6 Cov Kauj Ruam (nrog Duab)

Video: Tus Nqi ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Me Me: 6 Cov Kauj Ruam (nrog Duab)

Video: Tus Nqi ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Me Me: 6 Cov Kauj Ruam (nrog Duab)
Video: ¿Por qué ya no sale Jaume Lahoz en Topes de Gama? 2024, Hlis ntuj nqeg
Anonim
Tus Nqi Tshaj ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Micros
Tus Nqi Tshaj ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Micros
Tus nqi pheej yig dua ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Micros
Tus nqi pheej yig dua ESP8266 WiFi Shield rau Arduino thiab Lwm Yam Micros

Hloov tshiab: 29th Oct 2020

Kuaj nrog ESP8266 pawg thawj coj saib tsev qiv ntawv V2.7.4 - ua haujlwm

Hloov tshiab: 23rd Cuaj hlis 2016

Tsis txhob siv Arduino ESP board library V2.3.0 rau txoj haujlwm no. V2.2.0 ua haujlwm

Hloov tshiab: 19 Tsib Hlis 2016

Rev 14 ntawm txoj haujlwm no kho cov tsev qiv ntawv thiab cov cai kom ua haujlwm nrog ESP8266.com IDE plug-in V2.2

Hloov tshiab: 17th Kaum Ob Hlis 2105

Rev 11 ntawm txoj haujlwm no ntxuav lwm qhov kev sim sib txuas yog tias nws twb txuas nrog lawm. Kuj siv sijhawm sijhawm teem los ntawm lub vev xaib teeb tsa. Rev 10 tsis quav ntsej lub sijhawm teem sijhawm.

Hloov tshiab: 11th Kaum Ib Hlis 2015

Nov yog Rev 10 ntawm txoj haujlwm no. Rev 10 siv lub tsev qiv ntawv WiFi tsis thaiv, pfodESP8266WiFi, uas qis dua los ntawm kev muab tshwj xeeb rau cov neeg siv Windows. Nws kuj tseem tso cai rau nplooj ntawv web teeb tsa ntawm Serial baud tus nqi.

Hloov tshiab: 23rd Lub Kaum Hli 2015

Nov yog Rev 8 ntawm txoj haujlwm no. Rev 8 tau txhim kho ESP8266 cov cai uas ntseeg tau ntau dua. NETE: Txhua pob ntawv tau tso tseg txoj cai no kom txog thaum tus txais (tus neeg siv khoom) lees paub pob ntawv. Qhov no tuaj yeem siv sijhawm ntawm 10mS thiab 200mS. Lub sijhawm ntawd cov ntaub ntawv Serial nkag los ntawm UART tsis raug daws. Cov khoom tsis tuaj yeem tuaj yeem tsis 256 bytes. Ntawm 9600 baud nws yuav siv txog 270mS txhawm rau txhawm rau txhawm rau tsuav yog koj khaws Serial baud tus nqi mus rau 9600 lossis tsawg dua koj yuav tsum tsis txhob xoob cov ntaub ntawv xa tawm thaum ESP8266 xa cov pob ntawv dhau los. Qhov no ua rau koj muaj kev sib txuas WiFi zoo. Yog tias Wi-nkaus txuas tsis zoo, pob ntawv tuaj yeem ploj thiab yuav tsum rov kis los ntawm ESP826, tom qab ntawv Cov khoom tsis tuaj yeem tuaj yeem sau tau yog tias koj tab tom sim xa ntau cov ntaub ntawv thiab qee yam ntawm koj cov ntaub ntawv kuv yuav ploj.

Hloov tshiab: 20 Cuaj hlis 2015

Nov yog Rev 3 ntawm txoj haujlwm no. Rev 3 ntxiv qhov txuas txuas lub sijhawm tawm teeb tsa rau lub vev xaib teeb tsa. Yog tias tsis xa lossis tau txais cov ntaub ntawv nyob rau lub sijhawm ntawd WiFi Shield kaw qhov kev sib txuas thiab tos rau qhov tshiab. Qhov no ua kom WiFi Shield rov zoo los ntawm 'ib nrab kaw' kev sib txuas uas tshwm sim mus rau tus neeg siv tsuas yog ploj mus vim qhov tsis zoo wifi txuas, lub zog poob ntawm lub router lossis yuam kom kaw ntawm tus neeg siv khoom. Saib Kev Tshawb Nrhiav Ib Nrab-Qhib (Dropped) TCP/IP Qhov Txuas Txuas kom paub meej ntxiv.

Lub sijhawm sib txuas no tawm qhov tsis raug rau 15 sec. tab sis tuaj yeem hloov pauv raws li xav tau. Teeb nws rau 0 txhais tau tias tsis tas sijhawm. Thaum siv pfodDesigner, teeb tsa cov ntawv qhia zaub mov tshiab uas tsawg dua li lub sijhawm txuas mus.

Taw qhia

Nov yog Rev 11 ntawm ESP8266-01 WiFi Shield thiab yog lwm txoj hauv kev rau Pheej Yig/Yooj Yim Wifi Shield rau Arduino thiab lwm yam me me. Yog tias koj tsuas yog ua ib qho Wifi Shield ces Pheej Yig/Yooj Yim Wifi Shield rau Arduino thiab lwm lub micros yog txoj haujlwm siv vim nws yog qhov yooj yim tshaj plaws rau xaim. Txawm li cas los xij yog tias koj twb muaj ESP8266-01 tus qauv, koj tuaj yeem siv cov lus qhia no los ua WiFi Shield siv nws.

Yog tias koj muaj ib qho ntawm lwm qhov ESP8266 cov qauv liab qab, muab cov qauv muaj GPIO0 thiab GPIO2 muaj, tom qab ntawd koj tuaj yeem siv cov lus qhia no. Yog tias tus qauv ua GPIO15 nkag tau koj YUAV TSUM txuas nws mus rau GND ntawm tus tiv thaiv nrog tus nqi nruab nrab ntawm 3K3 thiab 10K

Rev 10 tsis xav tau I/O ntxiv ntawm Arduino board, lwm yam tom qab ntawd TX/RX thiab 5V zog thiab GND. Rev 10 siv GPIO0 thiab GPIO2 ua ConfigLink, raws li tau piav qhia ntawm nplooj ntawv no, ESP8266-01 Pin Magic. Tsis tas li cov kab kos duab siv hauv Rev10 tam sim no zoo ib yam ntawm cov uas siv Hauv Pheej Yig/Yooj Yim Wifi Shield rau Arduino thiab lwm yam me me. Nws kuj tseem hloov 5V rau 3V fais fab mov tus ntxhais lub rooj tsavxwm nrog 3 ntu sib cais thiab siv lub network tiv thaiv rau tsib 3K3 resistors. Thawj version Rev 1 nyob ntawm no.

Cov lus qhia no tseem muaj nyob ntawm www.pfod.com.au.

Nta

  • Siv qhov pheej yig thiab npaj tau ESP8266-01 tus qauv:- Lwm yam ESP8266 cov qauv kuj tseem tuaj yeem siv tau
  • Yooj yim siv:- 5V thiab 3.3V daim thaiv npog ua haujlwm raws li UART rau WiFi choj. Nws teeb tsa tus neeg rau zaub mov ntawm IP thiab chaw nres nkoj koj teeb tsa thiab ib zaug txuas nrog tsuas yog xa cov ntaub ntawv mus thiab los ntawm Serial txuas. Tsis muaj tsev qiv ntawv xav tau hauv kev sib txuas micro, tsuas yog Serial (UART) kev sib txuas, yog li nws tuaj yeem siv rau txhua lub micro-processor uas muaj chaw nres nkoj txuas. Nws kuj tseem tuaj yeem hloov kho kom raug teeb tsa los ua cov neeg siv khoom sib txuas (nrog rau kev nkag mus xaiv tau) rau cov neeg rau zaub mov nyob deb.
  • Yooj yim rau teeb tsa:- Ua kom luv qhov txuas thiab ua kom lub zog thaiv, tso nws mus rau hauv kev teeb tsa hom. Hauv hom no nws tsim kom muaj Kev Ruaj Ntseg Ruaj Ntseg uas koj tuaj yeem txuas rau ntawm koj lub xov tooj ntawm tes lossis khoos phis tawj. Tom qab ntawd qhib https://10.1.1.1 nthuav tawm lub vev xaib uas koj tuaj yeem teeb tsa koj lub network lub npe thiab tus password thiab tus IP thiab tus lej chaw nres nkoj daim ntaub thaiv yuav tsum mloog rau kev sib txuas. Lub vev xaib teeb tsa siv HTML5 kev lees paub los tshuaj xyuas tus neeg siv teeb tsa.

Kauj Ruam 1: Daim Ntawv Teev Npe

Qhov ESP8266-01 WiFi Shield xav tau cov hauv qab no, lossis zoo sib xws. Tus nqi qhia ntawm no yog li ntawm 30 Lub Yim Hli 2015 thiab tsis suav tus nqi thauj khoom:-

  • WiFi Module ESP8266-01-~ US $ 2.50 online (coj koj txoj hauv kev) LOS YOG kom ntseeg tau cov khoom lag luam SparkFun lossis Adafruit ESP8266-01-US $ 6.95
  • Uno Protoshield - US $ 1.88 (lossis ProtoShield Basic rau Arduino los ntawm Jaycar AU $ 4.95)
  • 36-pin header Element14-US $ 0.95 (lossis 4 tawm Lub Taub Hau Tsis Siv Lub Taub Hau-10-pin Ncaj los ntawm SparkFun US $ 1.50 lossis 40 Pin Header Terminal Sawb los ntawm Jaycar AU $ 0.95)
  • LD1117V33 3.3V tus tswj hwm Element14 - US $ 0.67
  • 1 tawm 1N5819 Schottky Diode Element14 - US $ 0.16 (lossis Jaycar AU $ 0.80) (Txhua Schottky Diode yuav ua)
  • BOURNS 4606X-101-332LF RESISTOR NETWORK, 3K3-US $ 0.27 (Cov rub tawm cov neeg tawm tsam tuaj yeem yog tus nqi hauv thaj tsam 3K3 txog 10K) koj kuj tseem tuaj yeem siv 5 x sib cais 3K3 resistors hloov raws li hauv Rev 1 xws li. 3K3 resistors - Digikey - US $ 0.52 (lossis 3K3ohm 1/2 Watt 1% Hlau Zaj Duab Xis Resistors - Pk.8 los ntawm Jaycar AU $ 0.55)

  • 1 tawm 330R resistor Element14 US $ 0.05 LOSSIS Sparkfun Resistor 330 Ohm 1/6 Watt PTH - 20 pob US $ 0.95 (lossis 330ohm 1/2 Watt 1% Hlau Zaj Duab Xis Resistors - Pk.8 los ntawm Jaycar AU $ 0.55)
  • 1 tawm 0.1uF capacitor Element14 - US $ 0.21 LOSSIS Sparkfun US $ 0.25
  • 1 tawm 10uF capacitor Element14 - US $ 0.11 LOSSIS Sparkfun US $ 0.45

Tus Nqi Tag Nrho ~ $ 6.80 + thauj khoom (raws li lub Yim Hli 2015) LOSSIS ~ US $ 11.25 siv Sparkfun lossis Adafruit ESP8266-01 module

Txhawm rau phiaj xwm phiaj xwm nrog lub thawb khawm teeb tsa thiab UART rau WiFi txoj haujlwm txuas, koj kuj xav tau USB rau Serial cable. Nov yog SparkFun's USB rau TTL Serial Cable (US $ 9.95) tau siv vim tias nws tau sau npe zoo kawg thiab muaj tus tsav tsheb txhawb rau ntau yam OS, tab sis koj tseem tuaj yeem siv Adafruit USB rau TTL Serial Cable - Debug / Console Cable rau Raspberry Pi uas yog tus nqi tib yam.

Nrog rau cov phiaj xwm kab, tus nqi tsuas yog ib qho WiFi Shield yog ~ US $ 16.75. Kev tshawb nrhiav nrawm pom Arduino WiFi Shields raug nqi tsawg kawg ntawm US $ 30 txog rau ntau dua US $ 70. Yog li txawm hais tias suav nrog tus nqi ib zaug ntawm cov phiaj xwm kab hluav taws xob daim ntawv no yog qhov pheej yig dua li lwm cov ntaub thaiv npog, nrog rau ua kom yooj yim dua rau teeb tsa thiab siv.

Kauj Ruam 2: Kev tsim kho

Kev tsim kho
Kev tsim kho
Kev tsim kho
Kev tsim kho
Kev tsim kho
Kev tsim kho

Cov txheej txheem saum toj no (ESP8266_01_WiFi_Shield_R2.pdf) qhia txog kev teeb tsa ntawm ntu uas xav tau rau daim ntaub thaiv no. Muaj tsuas yog rau yam, ntxiv rau ESP8266-01 tus qauv.

1N5819 diode tiv thaiv ESP8266-01 RX cov tswv yim los ntawm micro-processor's 5V cov zis. 330ohm (R6) resistor muab kev tiv thaiv kom luv ESP8266-01 TX tso tawm, yog tias lub tshuab ua haujlwm micro D1 tau ua yuam kev. Qee yam khoom ntawm 3V3 xav tau. Arduino UNO's 3V3 tus pin tsis muaj zog txaus los muab ESP2866 tus qauv. Nov yog peb lub davhlau ya nyob twg 5V rau 3.3V tus tswj hwm LD1117V33 tau siv. Lub 10uF capacitor xav tau kom ruaj khov LD1117V33 tus tswj hwm, yog li nws tau teeb tsa kom ze li sai tau rau cov tswj kev tso tawm.

Nov yog cov lus pom saum toj thiab hauv qab ntawm pawg thawj coj ua tiav.

Sab saum toj ntawm lub rooj tsavxwm zoo huv si. Hauv qab ntawm lub rooj tsavxwm yog me ntsis nas nas.

Xyuas kom koj ua tib zoo tshuaj xyuas cov thaiv thaum koj ua tiav, tshwj xeeb tshaj yog txuas rau tus pin ntawm ESP8266-01 thiab LD1117V33 peb lub davhlau ya nyob twg. Nws yooj yim rau xaim mus rau tus lej tsis raug thaum koj tig thiab xaim los ntawm hauv qab. Tus tswj hwm tau teeb tsa upside down kom cov hlau tab, uas yog hluav taws xob txuas nrog rau tus pin tso tawm, tab kom deb ntawm lub rooj tsav xwm.

Kauj Ruam 3: Kev teeb tsa WiFi Shield

Programming WiFi Shield
Programming WiFi Shield
Programming WiFi Shield
Programming WiFi Shield
Programming WiFi Shield
Programming WiFi Shield

WiFi Shield xav tau kev teeb tsa ib zaug, tsuas yog, thiab tsis muaj dua, nrog lub vev xaib teeb tsa thiab Serial rau WiFi Choj tus lej.

Txhawm rau phiaj xwm tiv thaiv, ua raws cov kauj ruam muab rau ntawm https://github.com/esp8266/arduino nyob rau hauv Kev Txhim Kho Nrog Cov Thawj Tswj. Thaum qhib Tus Thawj Saib Xyuas Haujlwm los ntawm Cov Cuab Yeej → Pawg ntawv qhia zaub mov thiab xaiv Hom Pabcuam thiab teeb tsa lub esp8266 platform. Txoj haujlwm no tau suav sau siv ESP8266 version 1.6.4-673-g8cd3697. Cov ntawv tom qab zoo dua yuav zoo dua tab sis tej zaum yuav muaj lawv tus kheej kab vim lub platform tab tom hloov pauv sai.

Kaw thiab rov qhib Arduino IDE thiab tam sim no koj tuaj yeem xaiv "Generic ESP8266 Module" los ntawm Tools → Board menu.

Koj kuj yuav tsum tau teeb tsa qhov tseeb version of pfodESP2866BufferedClient.zip Lub tsev qiv ntawv no ua haujlwm nrog ESP8266.com IDE plug-in V2.2. Yog tias koj tau teeb tsa pfodESP2866WiFi lub tsev qiv ntawv yav dhau los, tshem tawm cov ntawv teev npe ntawd kom tiav.

  1. Rub tawm qhov no pfodESP2866BufferedClient.zip cov ntaub ntawv rau koj lub khoos phis tawj, txav nws mus rau koj lub desktop lossis qee lwm daim nplaub tshev uas koj tuaj yeem nrhiav tau yooj yim
  2. Tom qab ntawd siv Arduino 1.6.5 IDE cov ntawv qhia zaub mov xaiv Sketch → Import Library → Ntxiv Library los nruab nws. (Yog tias Arduino tsis tso cai rau koj teeb tsa nws vim tias lub tsev qiv ntawv twb muaj lawm ces nrhiav thiab rho tawm cov ntawv qub pfodESP8266BufferedClient thiab tom qab ntawv import qhov no)
  3. Nres thiab rov pib dua Arduino IDE thiab hauv File-> Piv txwv tam sim no koj yuav tsum pom pfodESP8266BufferedClient.

Teeb tus Configuration Access Point password

Tom qab koj tau teeb tsa lub tsev qiv ntawv pfodESP8266BufferedClient, qhib Arduino IDE thiab luam daim duab no, ESP8266_WifiShield.ino, rau hauv IDE. Ua ntej koj teeb tsa daim phiaj thaiv, koj yuav tsum teeb koj tus kheej tus lej nkag mus rau teeb tsa nkag mus siv tau.

Hauv kev teeb tsa hom, WiFi Shield teeb tsa Lub Chaw Nkag Nkag ruaj ntseg hu ua pfodWifiWebConfig nrog tus lej zais uas muaj nyob hauv tus lej QR txuas nrog daim ntaub thaiv. Qhov kev sib txuas ruaj ntseg tiv thaiv ib tus neeg mloog hauv koj qhov kev sib txuas thaum koj tab tom teeb tsa koj lub network tiag tiag ssid thiab password. Koj yuav tsum tsim koj tus kheej lo lus zais rau koj cov ntaub thaiv npog. SecretKeyGenerator java program muaj nyob ntawm no uas tsim cov lej yuam sij 128 ntsis thiab sau tawm QR-p.webp

Hauv ob qho xwm txheej twg koj yuav tsum hloov kho #define ze rau saum daim duab kos nrog koj tus kheej tus lej password.

// =============== pib ntawm pfodWifiWebConfig nqis ==============

// hloov kho qhov no txhais nrog tus password los ntawm koj tus lej QR //https://www.forward.com.au/pfod/secureChallengeResponse/keyGenerator/index.html #define pfodWifiWebConfigPASSWORD "b0Ux9akSiwKkwCtcnjTnpWp"

Koj tseem tuaj yeem teeb tsa koj tus kheej teeb tsa Lub Npe Access Point lub npe, yog tias koj xav tau.

Programming lub Shield

Txhawm rau phiaj xwm tiv thaiv, tshem nws los ntawm Arduino pawg thawj coj, luv tawm FLASH_LINK (pom ntawm no nrog qhov txuas txuas xiav nyob nruab nrab ntawm pawg thawj coj saib) thiab txuas USB rau Serial cable raws li qhia hauv daim duab. Txheeb daim duab thiab koj cov xov hlau.

RX txhuas txuas rau D0 thiab TX txhuas txuas rau D1. VCC (+5V) txuas rau 5V tus pin thiab GND txuas rau GND tus pin ntawm daim ntaub thaiv. Luv luv FLASH_LINK raws li qhia saum toj no. Daim duab saum toj no yog rau SparkFun USB rau Serial cable. Yog tias koj siv Adafruit cable, nws tsis muaj lub cim cim cim tab sis yog xim xim, liab yog lub zog, dub yog hauv av, ntsuab yog TX thiab dawb yog RX.

Ua tib zoo tshawb xyuas VCC thiab GND kev sib txuas vim nws yooj yim rau luv USB lub zog hluav taws xob yog tias koj ib tus pin tawm

Tom qab ntawd ntsaws rau hauv USB cable rau koj lub khoos phis tawj kom txhawb nqa ESP8266-01 hauv hom phiaj. Xaiv nws qhov chaw nres nkoj COM hauv Cov Cuab Yeej → Chaw nres nkoj ntawv qhia zaub mov. Tawm ntawm CPU Zaus, Flash Loj thiab Upload Ceev ntawm lawv qhov chaw teeb tsa

Tom qab ntawd xaiv Cov Ntaub Ntawv → Upload lossis siv khawm xub xub los ua ke thiab rub tawm cov program. Ob daim ntawv tau muab tso tawm. Yog tias koj tau txais cov lus yuam kev xa mus xyuas koj lub xov tooj sib txuas tau txuas rau hauv tus pin raug thiab sim dua. Thaum qhov kev zov me nyuam ua tiav, tshem qhov txuas luv ntawm FLASH_LINK.

Txuas nrog Configuration QR code

Koj yuav xav tau koj tus kheej teeb tsa tus lej nkag siv tus lej nkag nkag txhua lub sijhawm koj xav tau teeb tsa daim thaiv, yog li nws yooj yim los muab nws ua QR code rau daim ntaub thaiv (lossis nws cov ntaub ntawv). Nov yog Qhib Chaw Haujlwm nthuav qhia cov ntaub ntawv uas tau siv los luam tawm QR code thiab cov ntsiab lus txuas rau qhov haujlwm no. Hloov QR code thiab tus lej cim nrog koj tus kheej tshwj xeeb kom ua tiav daim thaiv.

Kauj ruam 4: Kho lub WiFi Shield

Configuring WiFi Shield
Configuring WiFi Shield
Configuring WiFi Shield
Configuring WiFi Shield
Configuring WiFi Shield
Configuring WiFi Shield

Ib daim ntaub thaiv npog WiFi yuav tsum tau teeb tsa nrog lub npe network thiab tus password ntawm lub network hauv zos. Nws kuj tseem yuav tsum tau muab tus IP thiab tus lej chaw nres nkoj los mloog rau kev sib txuas. Txhua lwm cov ntaub thaiv npog WiFi muaj tus IP thiab chaw nres nkoj tsis muaj tus lej nyuaj hauv qhov kos duab thiab ib qho nyuaj code lub npe network thiab tus password lossis siv tus txheej txheem muaj tswv nrog cov tswv lag luam los txuas rau lub network hauv zej zog. Qhov no yog qhov txwv heev thaum koj muaj ntau yam khoom siv hauv ib puag ncig hloov zuj zus. Cov ntaub thaiv npog WiFi no siv qhov qhib nplooj ntawv nplooj ntawv txoj hauv kev los teeb tsa ob lub npe network thiab tus password, thiab tus IP chaw nyob thiab chaw nres nkoj No.

ESP8266-01 muaj qhov txwv tsawg ntawm cov muaj tawm, tsuas yog GPIO0 thiab GPIO2. Hauv qhov kev tsim qauv no, tom qab txhawb nqa, cov cai hauv ESP2866-01 tshawb xyuas yog tias GPIO2 raug tsaws thiab yog li teeb tsa ESP8266-01 hauv hom teeb tsa. Txawm li cas los xij qhov pib ntawm GPIO2 cov tswv yim yuav tsum tau ncua kom txog thaum tom qab theESP8266-01 tau ua tiav lub hwj chim. Yog GPIO2 raug tsaws thaum lub zog txhawb nqa ESP8266-01 tus qauv tsis pib li qub. Qhov kev ncua no hauv av GPIO2 yog ua tiav los ntawm kev siv GPIO0 raws li hauv av. Tom qab ESP8266-01 pib, teeb tsa () code ua rau GPIO0 tso tawm thiab teeb tsa LOW. Qhov no yuav tom qab GPIO2 yog tias CONFIG_LINK tau luv dua.

Thawj qhov ntawm txoj haujlwm no (Rev 1), siv Arduino digital I/O ntxiv los ua qhov av, uas xav tau cov lej ntxiv hauv Arduino kos duab. Rev 2+, tshem tawm qhov xav tau rau ib qho ntxiv code hauv Arduino kos duab, lwm yam tom qab ntawd ncua sijhawm luv luv nyob rau sab saum toj ntawm teeb tsa () kom tsis quav ntsej ESP8266 qhov debug tso tawm.

Txhawm rau sim ntsuas teeb tsa ESP8266-01 WiFi Shield, tsuas yog ntsaws nws mus rau hauv pawg thawj coj saib xyuas Arduino, luv luv CONFIG_LINK (xiav txuas luv nyob rau sab laug ntawm daim duab) thiab siv lub zog rau Arduino board.

Hauv qhov teeb tsa no tus qauv ESP8266 teeb tsa qhov chaw nkag tau ruaj ntseg nrog lub npe pfodWifiWebConfig. Qhov kev nkag mus no yuav tshwm ntawm koj lub xov tooj ntawm tes thiab hauv koj lub computer. Txhawm rau txuas mus rau qhov chaw nkag no koj yuav tsum nkag mus rau tus lej cim tshwj xeeb rau koj daim ntaub thaiv. Koj tuaj yeem ntaus tus lej nkag los ntawm txhais tes tab sis nws yooj yim dua thiab ntseeg tau ntau dua los luam theej duab QR code uas koj yav dhau los txuas rau koj daim ntaub thaiv, siv QR scanner app, xws li QR Droid Private

Tom qab ntawd luam thiab muab tus password nkag rau hauv koj lub xov tooj ntawm tes WiFi teeb tsa lub vijtsam txhawm rau txuas koj lub xov tooj mus rau qhov chaw teeb tsa nkag.

Tom qab ntawd qhib lub vev xaib thiab ntaus hauv URL https://10.1.1.1 Qhov no yuav rov qab teeb tsa lub vev xaib.

Cov ntaub thaiv npog WiFi tau ua tiav hauv Network SSID nrog lub network hauv zos nrog lub teeb liab zoo tshaj plaws. Qhov feem ntau yuav yog qhov koj xav tau. Yog tias tsis yog sau dua qhov nkag ntawd. Koj yuav tsum nkag mus rau Network SSID thiab tus password thiab chaw nres nkoj Tsis yog. Tus IP chaw nyob yog nyob ntawm yeem. Yog tias koj tso nws tseg, WiFi Shield yuav siv DHCP kom tau txais nws tus IP chaw nyob ntawm koj lub network. Nws feem ntau yooj yim dua los txheeb xyuas tus IP tshwj xeeb yog li koj tuaj yeem txuas tau yooj yim rau daim ntaub thaiv no.

Rev 10 kuj tseem tso cai rau koj teeb tsa Serial baud tus nqi rau daim ntaub thaiv no. Default yog 19200, tab sis cov piv txwv ntawm no siv 9600 yog li hloov tus nqi baud rau 9600

Yog tias koj lub browser yog HTML5 ua raws ces lub vev xaib yuav lees paub cov tswv yim ua ntej xa nws.

Thaum koj nyem qhov Configure khawm, WiFi Shield yuav ua tiav cov txiaj ntsig thiab khaws cia hauv EEPROM thiab tom qab ntawd tso saib cov lus teb, zoo li ib qho saum toj no, qhia koj kom lub zog txuas mus txuas rau koj lub network.

Kauj Ruam 5: Siv WiFi Shield

Siv WiFi Shield
Siv WiFi Shield
Siv WiFi Shield
Siv WiFi Shield
Siv WiFi Shield
Siv WiFi Shield

Hauv qhov haujlwm ua tiav, koj yuav rub lub pob nyem ib ntus rau sab nraum koj lub phiaj xwm lub thawv txuas nrog CONFIG_LINK, thiab qhia tus neeg siv kom nyem lub pob nyem thiab tom qab ntawd ua kom lub zog ntaus ntawv mus rau hauv kev teeb tsa. Cov cai koj tau ntim rau hauv ESP8266-01 tseem ua rau ESP8266's GPIO0 tus pin LOW thaum tus qauv nyob hauv kev teeb tsa, yog li koj tuaj yeem txuas 270ohm resistor thiab LED nruab nrab ntawm 3.3V txoj kev tsheb nqaj hlau thiab GPIO0 thiab teeb LED sab nraum lub thawv, los qhia rau tus neeg siv tias lawv nyob hauv hom teeb tsa.

Rev 10 kuj tseem tso cai rau koj teeb tsa Serial baud tus nqi rau daim ntaub thaiv no. Default yog 19200, tab sis cov piv txwv ntawm no siv 9600 yog li hloov tus nqi baud mus rau 9600 ntawm cov vev xaib teeb tsa, saum toj no

Raws li tau hais los saum toj no cov duab kos uas koj thauj mus rau hauv koj Arduino, lossis lwm lub tshuab ua haujlwm me me, xav tau ncua sijhawm luv kom hla qhov debug tso tawm los ntawm ESP8266 module. Tsis tas li ntawd, kom tau txais thiab xa cov ntaub ntawv ntawm WiFi, los ntawm koj daim duab, koj tsuas yog nyeem thiab sau rau koj lub chaw nres nkoj (txuas nrog D0, D1) ntawm 9600 baud. Yog li tsis quav ntsej ESP8266 qhov kev debug tso tawm ntxiv rau ncua sijhawm luv luv nyob rau sab saum toj ntawm teeb tsa () txheej txheem

void teeb tsa () {

ncua (1000); // tos ntawm no rau qhov thib ob cia ESP8266 ua kom tiav lub zog // qhov no tseem hla lub WiFi Shield qhov debug tso zis ntawm lub zog nce // ua ntej pib qhov txuas txuas. …. lwm cov teeb tsa ntawm no

Piv txwv ntawm no siv Arduino UNO tab sis koj tuaj yeem siv txhua lub tshuab ua haujlwm me me, xws li 5V lossis 3.3V raws li uas muaj UART. Yog tias koj siv 3.3V micro-processor, koj yuav tsum tau muab 5V rau WiFi Shield lub zog siv. Qhov 5V no tseem yuav txuas nrog daim thaiv tus pin 5V, yog li koj yuav tsum txheeb xyuas qhov no yog qhov siv tau rau micro koj tau ntsaws daim ntaub thaiv.

Raws li kev sim ntawm daim thaiv no, pfodApp tau siv los qhib Uno's LED qhib thiab tawm ntawm WiFi. Thawj zaug pfodDesigner tau siv los tsim cov ntawv qhia yooj yim.

NCO TSEG: Qhov hloov tshiab kawg ntawm pfodApp xa keepAlive msgs kom lub wifi thaiv yuav tsis siv sijhawm

Tom qab ntawd cov cai tau tsim rau Kev Txuas Txuas ntawm 9600 baud thiab xa cov ntaub ntawv mus rau PC, siv wifi xa cov ntaub ntawv.

Cov teeb duab teeb tsa () tsis tas yuav muaj qhov ncua (1000) ntxiv vim tias pfod parser tsis quav ntsej cov cim sab nraud {}, tab sis nws suav nrog vim nws tau pom zoo rau pawg WiFi no.

Daim duab kos tiav, ESP8266_UnoLedControl.ino nyob ntawm no. Nco tseg tsis muaj tus lej tshwj xeeb WiFi, kos duab tsuas yog nyeem thiab sau rau hauv Serial output.

Tshem tawm WiFi Shield, xaiv Cov Cuab Yeej → Pawg → Uno hauv Arduino IDE thiab teeb tsa cov duab kos no rau hauv UNO. NCO TSEG: koj yuav tsum tshem WiFi daim thaiv rau program UNO vim tias USB txuas nrog UNO's TX/RX pins.

Txuas WiFi Shield rov qab rau hauv, nws yuav cia li txuas rau koj lub network hauv zej zog thiab pib server ntawm qhov chaw nres nkoj koj teeb tsa. Hauv pfodApp koj tuaj yeem teeb tsa kev sib txuas rau lub cuab yeej no. Saib pfodAppForAndroidGettingStarted.pdf kom paub meej.

Tom qab ntawd txuas rau tig Uno's LED qhib thiab tawm ntawm koj lub xov tooj ntawm tes ntawm wifi.

Qhov ntawd tiav lawm !!

Kauj Ruam 6: Kev txuas ntxiv rau WiFi Shield thiab Cov Lus xaus

Ntxiv Client Support

Raws li tau nthuav tawm ntawm no WiFi ntaub thaiv npog tuaj yeem teeb tsa los ua tus server mloog ntawm tus IP tshwj xeeb thiab chaw nres nkoj Tsis tau. Yog li los ntawm kev ntxiv cov haujlwm no rau nplooj ntawv teeb tsa nplooj ntawv thiab txuag/thauj khoom Tus Neeg Siv khoom, koj kuj tseem tuaj yeem siv WiFi Shield no txuas rau lub server deb, nrog tus neeg siv lub npe thiab tus lej nkag, thiab xa cov ntaub ntawv mus rau qhov ntawd.

Ntxiv sab nrauv teeb tsa thawb khawm thiab coj

Raws li tau hais los saud, hauv daim ntawv thov tiag tiag koj yuav rub lub pob nyem ib ntus rau sab nraum koj lub phiaj xwm lub thawv txuas nrog rau CONFIG_LINK, thiab qhia tus neeg siv kom nyem lub pob nyem thiab tom qab ntawd ua kom lub zog ntaus ntawv mus rau hauv hom teeb tsa. Cov cai koj tau ntim rau hauv ESP8266-01 tsav GPIO0 tus pin LOW thaum tus qauv nyob hauv hom teeb tsa, yog li koj tuaj yeem txuas 270ohm resistor thiab LED nruab nrab ntawm 3.3V kev tsheb nqaj hlau thiab GPIO0 thiab teeb tsa coj mus rau sab nraum lub thawv, qhia rau tus neeg siv tias lawv nyob hauv hom teeb tsa.

Xaus

Qhov Rev 2 ntawm ESP8266-01 WiFi Shield siv tus qauv pheej yig thiab npaj tau ESP8266-01. Lwm cov qauv ESP8266 kuj tseem tuaj yeem siv tau.

Ib zaug programmed koj tsis tas yuav program nws dua los teeb tsa lossis hloov pauv cov chaw network. Lawv txhua tus tuaj yeem teeb tsa ntawm lub vev xaib ntawm kev ruaj ntseg WiFi ib ntus network.

Nws yog qhov yooj yim los cuam tshuam rau ib qho micro uas muaj UART thiab ua haujlwm nrog ob qho tib si 5V lossis 3.3V micro-processors.

Tsis muaj tsev qiv ntawv yuav tsum tau txuas rau daim ntaub thaiv no. Nws ua raws li Serial yooj yim rau WiFi choj.

Pom zoo: