Cov txheej txheem:

Pib Pib/ NodeMCU ESP8266 ntawm Arduino IDE: 6 Cov Kauj Ruam
Pib Pib/ NodeMCU ESP8266 ntawm Arduino IDE: 6 Cov Kauj Ruam

Video: Pib Pib/ NodeMCU ESP8266 ntawm Arduino IDE: 6 Cov Kauj Ruam

Video: Pib Pib/ NodeMCU ESP8266 ntawm Arduino IDE: 6 Cov Kauj Ruam
Video: NodeMCU V3 ESP8266 - обзор, подключение и прошивка в Arduino IDE 2024, Hlis ntuj nqeg
Anonim
Pib Pib/ NodeMCU ESP8266 ntawm Arduino IDE
Pib Pib/ NodeMCU ESP8266 ntawm Arduino IDE

Txheej txheem cej luam

Hauv qhov kev qhia no, koj yuav kawm paub siv NodeMCU ntawm Arduino IDE li cas.

Yam Koj Yuav Kawm

  • Cov ntaub ntawv dav dav txog NodeMCU
  • Yuav ua li cas rau nruab ESP8266 raws cov laug cam ntawm Arduino IDE
  • Yuav ua li cas rau phiaj xwm NodeMCU ntawm Arduino IDE
  • Qhia cov laug cam uas tuaj yeem siv hloov chaw ntawm NodeMCU

Kauj Ruam 1: NodeMCU yog dab tsi?

NodeMCU yog dab tsi?
NodeMCU yog dab tsi?

Hnub no, daim ntawv thov IOT tau nce, thiab txuas cov khoom tau txais ntau thiab tseem ceeb dua. Muaj ntau txoj hauv kev los txuas cov khoom xws li Wi-nkaus raws tu qauv.

NodeMCU yog qhov qhib platform raws li ESP8266 uas tuaj yeem txuas cov khoom thiab cia cov ntaub ntawv hloov pauv siv Wi-nkaus raws tu qauv. Ib qho ntxiv, los ntawm kev muab qee yam tseem ceeb tshaj plaws ntawm microcontrollers xws li GPIO, PWM, ADC, thiab lwm yam, nws tuaj yeem daws ntau qhov haujlwm xav tau ib leeg.

Cov yam ntxwv dav ntawm pawg thawj coj no yog raws li hauv qab no:

  • Yooj yim rau siv
  • Programmability nrog Arduino IDE lossis IUA lus
  • Muaj raws li qhov chaw nkag lossis chaw nres tsheb
  • siv tau hauv Cov Txheej Txheem-tsav API daim ntawv thov
  • Muaj lub kav hlau txais xov sab hauv
  • Muaj 13 tus pin GPIO, 10 PWM raws, I2C, SPI, ADC, UART, thiab 1-Wire

Kauj Ruam 2: Yuav Ua Haujlwm Li Cas NodeMCU Siv Arduino IDE

Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE
Yuav Ua Li Cas Program NodeMCU Siv Arduino IDE

Txhawm rau siv Arduino IDE los ua haujlwm NodeMCU, koj yuav tsum qhia nws rau software thaum xub thawj.

Txhawm rau ua qhov no luam cov cai hauv qab no thiab ua raws cov theem hauv qab no:

arduino.esp8266.com/stable/package_esp8266c…

qib 1. Xaiv Nyiam nyob hauv Cov ntawv qhia zaub mov thiab sau cov cai theej hauv Cov Thawj Saib Xyuas Haujlwm Ntxiv URLs ib feem. Tom qab ntawv nyem OK.

Kauj ruam 2. Tshawb nrhiav lo lus ESP8266 hauv Boards> pawg thawj coj ntawm cov cuab yeej ntawv qhia zaub mov. Tom qab ntawd teeb tsa ESP8266 cov laug cam. Tom qab ua tiav kev teeb tsa, koj yuav pom daim INSTALLED daim ntawv lo ntawm ESP8266 cov laug cam.

Tom qab ob kauj ruam no, koj tuaj yeem pom ESP8266 raws cov laug cam xws li NodeMCU hauv koj li Arduino IDE cov npe pawg thawj coj, thiab koj tuaj yeem xaiv koj lub rooj tsav xwm xav tau kom xa cov cai.

Txhawm rau siv tus pin, koj yuav tsum xaiv tus lej GPIO. Piv txwv li, tus pin D7 tau txhais tias yog GPIO13. Yog li koj yuav tsum teeb tus lej tus lej 13 txhua lub sijhawm koj xav siv D7 hauv koj qhov haujlwm. Tsis tas li, koj tuaj yeem siv tus pin D2 (GPIO4) ua SDA thiab tus pin D1 (GPIO5) ua SCL

Kauj Ruam 3: Tswj LED Los ntawm HTTP Page Siv NodeMCU

Koj tuaj yeem txuas internet hauv Wi-nkaus siv NodeMCU, thiab siv koj cov lus txib uas xav tau los ntawm kev tsim nplooj ntawv

Hauv qhov piv txwv no, koj tuaj yeem tswj hwm LED los ntawm kev nias lub ON thiab OFF qhov tseem ceeb. Nkag mus rau koj lub modem SSID thiab tus lej zais hauv qhov muab thiab muab tso rau hauv koj lub NodeMCU pawg thawj coj siv Arduino IDE. (Tawm lwm qhov chaw rau lub neej ntawd)

Kauj ruam 4: Code

Tom qab qhib Serial Monitor, yog tias tsim kev sib txuas is taws nem, koj yuav tau muab tus IP chaw nyob ntawm nplooj ntawv koj tau tsim (piv txwv li 192.168.1.18). Luam thiab muab tshuaj txhuam rau hauv koj tus browser kom qhib HTTP nplooj ntawv.

Kauj Ruam 5: Dab Tsi Lwm Lub Rooj Sib Tham Kuv Puas Siv Tau NodeMCU?

Dab Tsi Lwm Lub Rooj Sib Tham Kuv Puas Siv Tau NodeMCU?
Dab Tsi Lwm Lub Rooj Sib Tham Kuv Puas Siv Tau NodeMCU?

Muaj ntau yam tseem ceeb tseem ceeb rau kev xaiv hom board rau IOT system, xws li tus lej GPIO pins, kev sib txuas lus cov txheej txheem, suav nrog tus kav hlau txais xov, thiab lwm yam.

Tsis tas li, muaj cov laug cam sib txawv thiab cov platform, txhua tus muaj nws cov yam ntxwv tshwj xeeb.

Ntawm no peb tau sib piv lawv raws li qhov tseem ceeb tshaj plaws xav tau rau IOT cov haujlwm.

Kauj Ruam 6: Cov Qauv Piv Txwv:

  • Ntse Qhov Rooj Xauv w/ WiFi ID nkag mus Nplooj ntawv los ntawm Arduino & ESP8266
  • Tham nrog koj Arduino & Tswj Nws los ntawm Google Assistant
  • Ua si nrog Hluav Taws Hla WIFI! ESP8266 & Neopixels (Xws li Android App)
  • nstagram Nyiam Speedometer los ntawm Arduino & ESP8266

Yog tias koj pom cov ntawv qhia no muaj txiaj ntsig thiab txaus siab thov nyiam peb hauv facebook.

Pom zoo: