Cov txheej txheem:

ESP8266 Chaw Nres Tsheb Xim: 8 Kauj Ruam
ESP8266 Chaw Nres Tsheb Xim: 8 Kauj Ruam

Video: ESP8266 Chaw Nres Tsheb Xim: 8 Kauj Ruam

Video: ESP8266 Chaw Nres Tsheb Xim: 8 Kauj Ruam
Video: how to fix other devices not showing in device manager in windows 10 2024, Kaum ib hlis
Anonim
ESP8266 Qhov Chaw Nres Tsheb Xim
ESP8266 Qhov Chaw Nres Tsheb Xim
ESP8266 Qhov Chaw Nres Tsheb Xim
ESP8266 Qhov Chaw Nres Tsheb Xim
ESP8266 Qhov Chaw Nres Tsheb Xim
ESP8266 Qhov Chaw Nres Tsheb Xim

Hauv cov lus qhia no kuv xav qhia koj yuav ua li cas thiaj tsim tau ESP8266 lub chaw nres tsheb huab cua zoo rau phab ntsa mount nrog huab cua huab cua thiab xim tft npo.

Kauj Ruam 1: Cov Cuab Yeej thiab Cov Khoom

Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom
Cov Cuab Yeej thiab Cov Khoom

Cov ntaub ntawv:

  • NodeMCU Amica V2 lossis Wemos D1 Mini
  • ArduiTouch ESP phab ntsa mounting cov khoom siv

Cov Cuab Yeej:

  • cam khwb cia hlau
  • ntsia hlau tsav tsheb
  • sab txiav pliers
  • voltmeter (yeem)

Software:

Arduino IDE Cov

Kauj Ruam 2: Sib dhos ntawm ArduiTouch Kit

Sib dhos ntawm ArduiTouch Kit
Sib dhos ntawm ArduiTouch Kit
Sib dhos ntawm ArduiTouch Kit
Sib dhos ntawm ArduiTouch Kit

Koj yuav tsum sib sau ua ke ArduiTouch cov khoom ua ntej. Thov ua tib zoo saib hauv phau ntawv qhia kev tsim kho.

Kauj ruam 3: Txhim kho USB Drivers

Txhim kho USB Drivers
Txhim kho USB Drivers

NodeMCU module suav nrog CP2102 nti rau USB interface. Feem ntau tus neeg tsav tsheb yuav raug teeb tsa siv lub tshuab yog tias NodeMCU txuas nrog thawj zaug nrog lub PC. Qee zaum cov txheej txheem no ua tsis tiav. Hauv qhov no koj yuav tsum nruab tus tsav tsheb

www.silabs.com/products/development-tools/s…

Yog tias koj xav siv Wemos D1 koj yuav tsum teeb tsa cov tsav tsheb rau CH340 USB interface hloov chaw:

www.wch.cn/download/CH341SER_ZIP.html

Kauj Ruam 4: Kev npaj Arduino IDE rau ESP8266

Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
Kev npaj Arduino IDE rau ESP8266
  1. ESP8266 module tsis yog ib feem ntawm Arduino-IDE. Peb yuav tsum nruab nws ua ntej. Qhib cov ntaub ntawv/nyiam nyob hauv Aduino-IDE thiab ntxig qhov txuas hauv qab no hauv Tus Thawj Saib Xyuas Lub Rooj Sib Tham Ntxiv URLs:
  2. Kaw lub qhov rai no nrog khawm OK. Open tam sim no tus thawj tswj hwm: Cov cuab yeej / Pawg Thawj Coj / Tus Thawj Saib Xyuas Haujlwm
  3. Mus rau ESP8266 nkag thiab nruab nws
  4. Tam sim no koj tuaj yeem xaiv NodeMCU 1.0 (ESP-12E Module) lossis WeMos D1 R2 & mini. Teem CPU zaus rau 80MHz, Flash Loj rau „4M (3M SPIFFS)“, tus nqi baud uas koj xaiv thiab COM chaw nres nkoj. 4af ua

Kauj Ruam 5: Txhim Kho Tsev Qiv Ntawv Ntxiv

Nruab ib lub tsev qiv ntawv hauv qab no los ntawm Arduino Library Manager

  1. Mini Grafx los ntawm Daniel Eichhorn:
  2. ESP8266 WeatherStation los ntawm Daniel Eichhorn:
  3. Json Streaming Parser los ntawm Daniel Eichhorn:
  4. simpleDSTadjust los ntawm neptune2:

Koj tseem tuaj yeem rub tawm lub tsev qiv ntawv ncaj qha raws li ZIP cov ntaub ntawv thiab uncompress lub nplaub tshev hauv qab kojrarduinosketchfolder/qiv ntawv/

Tom qab txhim kho cov tsev qiv ntawv, rov pib dua Arduino IDE.

Kauj ruam 6: Source Code

Cov cai rau huab cua-chaw nres tsheb raws li qhov txaus txaus los ntawm Daniel Eichhorn

blog.squix.org

Peb tau hloov qee qhov kev hloov pauv me me los ua txoj cai rau ArduiTouch. Koj yuav tsum tau rho tawm Zip cov ntawv khaws cia hauv cov npe tshiab nrog tib lub npe.

Kauj Ruam 7: Kev Cai Tshwj Xeeb hauv Settings.h

Hauv qhov chaws koj yuav pom cov ntawv npe hu ua settings.h. Qee qhov kev hloov pauv hauv cov ntawv no xav tau rau kev kho kom haum:

WiFi:

Thov nkag mus rau SSID thiab pasword hauv kab 25 thiab 26 ntawm settings.h

#txhais WIFI_SSID "yourssid"

#define WIFI_PASS "yourpassw0rd"

Account rau OpenWeatherMap:

Txhawm rau tau txais cov ntaub ntawv tom qab los ntawm lub platform OpenWeatherMap koj yuav xav tau tus lej nyiaj. Sau npe ntawm no kom tau txais tus lej API:

Nkag mus rau koj tus lej API hauv kab 38 ntawm settings.h

Txoj hlua OPEN_WEATHER_MAP_APP_ID = "koj_api_key";

Koj qhov chaw nyob:

Mus rau https://openweathermap.org/find?q= thiab tshawb nrhiav qhov chaw nyob. Mus los ntawm cov txiaj ntsig teeb tsa thiab xaiv qhov nkag mus ze rau qhov chaw tiag tiag uas koj xav qhia cov ntaub ntawv rau. Nws yuav yog URL zoo li https://openweathermap.org/city/2657896. Tus lej tom kawg yog qhov koj muab rau qhov hauv qab no.

Sau tus lej thiab lub npe ntawm koj qhov chaw nyob hauv kab 45 thiab 46 ntawm settings.h

Txoj hlua OPEN_WEATHER_MAP_LOCATION_ID = "2804279";

Txoj hlua DISPLAYED_CITY_NAME = "Ziesar";

Sijhawm:

Thov xaiv koj lub sijhawm nyob hauv kab 65 ntawm settings.h

#define UTC_OFFSET +1

Kauj ruam 8: Khiav Code

Khiav Txoj Cai
Khiav Txoj Cai

Thov qhib cov qauv no hauv Arduino IDE. Tom qab muab tso ua ke thiab tso tawm koj yuav pom lub sijhawm tam sim no thiab kub ntawm koj qhov chaw nyob. Ntxiv mus ntau qhov kev kwv yees huab cua rau ob peb hnub tom ntej no tau tshwm sim. Qhov kov tsuas muaj ib txoj haujlwm. Koj tuaj yeem xaiv lub sijhawm tso tawm los ntawm kev kov nyob rau sab saud ntawm qhov screen.

Pom zoo: