Cov txheej txheem:

Internet Tswj LED Siv NodeMCU: 6 Cov Kauj Ruam
Internet Tswj LED Siv NodeMCU: 6 Cov Kauj Ruam

Video: Internet Tswj LED Siv NodeMCU: 6 Cov Kauj Ruam

Video: Internet Tswj LED Siv NodeMCU: 6 Cov Kauj Ruam
Video: Tswv Yexus lub neej thaum pib txug thaum xaus 2024, Hlis ntuj nqeg
Anonim
Internet Tswj LED Siv NodeMCU
Internet Tswj LED Siv NodeMCU

Internet ntawm Yam (IoT) yog cov txheej txheem sib txuas ua ke cov cuab yeej siv tshuab, tshuab siv tshuab thiab digital, khoom siv, tsiaj txhu lossis tib neeg uas tau muab cov cim tshwj xeeb thiab muaj peev xwm hloov cov ntaub ntawv hla lub network yam tsis xav tau tib neeg-rau-tib neeg lossis tib neeg- kev sib tham hauv computer.

Hauv cov lus qhia no, peb yuav ua qhov yooj yim IoT project. Web nplooj ntawv tswj hwm LED siv NodeMCU txuas nrog ntawm lub network hauv zos.

DESCRIPTIONNodeMCU yog qhov qhib IoT platform. Nws suav nrog cov software uas khiav ntawm ESP8266 WiFi SoC los ntawm Espressif, thiab kho vajtse uas yog raws ESP-12 module. Lub sij hawm "NodeMcu" los ntawm lub neej ntawd hais txog lub firmware ntau dua li cov khoom siv dev. Lub firmware ESP8266 siv Lua cov ntawv sau. Nws yog raws li Lua txoj haujlwm thiab ua rau Espressif Tsis-OS SDK rau ESP8266. Nws siv ntau qhov haujlwm qhib, xws li Lua-cjson thiab spiff. LUA raws kev sib tham sib firmware rau Expressif ESP8622 Wi-Fi SoC, ntxiv rau qhib qhov khoom siv kho vajtse uas tsis sib xws rau $ 3 ESP8266 Wi-Fi modules suav nrog CP2102 TTL rau USB nti rau lub cajmeem thiab debugging, yog breadboard-phooj ywg, thiab tuaj yeem tsuas yog siv tau ntawm nws lub micro USB chaw nres nkoj.

NTA

  • Wi-Fi Module-ESP-12E module zoo ib yam li ESP-12 module tab sis nrog 6 GPIOs ntxiv.
  • USB - micro USB chaw nres nkoj rau lub zog, lub cajmeem thiab debugging
  • Headers-2x 2.54mm 15-pin header nrog nkag mus rau GPIOs, SPI, UART, ADC, thiab lub zog pinsMisc-Pib dua thiab nyem khawm
  • Lub zog - 5V ntawm micro USB chaw nres nkoj

Kauj Ruam 1: Cov Ntaub Ntawv Yuav Tsum Tau

Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
Cov Ntaub Ntawv Yuav Tsum Tau
  1. ESP8266 NodeMCU
  2. Cov qhob cij
  3. LED
  4. Jumper Hlau
  5. Arduino IDE Cov

Kauj Ruam 2: Txhim Kho NodeMCU Pawg Thawj Tswj Hwm Pob

Txhim Kho NodeMCU Pawg Thawj Tswj Hwm Pob
Txhim Kho NodeMCU Pawg Thawj Tswj Hwm Pob
Txhim Kho NodeMCU Pawg Thawj Tswj Hwm Pob
Txhim Kho NodeMCU Pawg Thawj Tswj Hwm Pob
  1. Qhib Arduino IDE. Mus rau Cov Ntaub Ntawv-> Nyiam. Nkag mus https://arduino.esp8266.com/stable/package_esp8266… mus rau Tus Thawj Saib Xyuas Haujlwm Ntxiv URLs teb
  2. Tam sim no mus rau Cov Cuab Yeej-> Boards-> Tus Thawj Saib Xyuas Haujlwm, thiab tshawb rau ESP8266 thiab teeb tsa pob.

Kauj Ruam 3: Pin Txuas

Tus Pin Txuas
Tus Pin Txuas
  1. D7 ntawm NodeMCU rau LED's +ve.
  2. G ntawm NodeMCU rau LED's -ve.

Kauj ruam 4: Source Code

Qhov Code
Qhov Code
Qhov Code
Qhov Code
Qhov Code
Qhov Code
Qhov Code
Qhov Code

Hauv txoj cai

hloov ssid rau koj lub npe ssid

thiab Password rau koj tus SSID tus password

const char* ssid = "MODI"; // koj ssid

const char* password = "8826675619"; // Koj Tus Password

Kauj Ruam 5: Hloov Txoj Cai

Xa cov Code
Xa cov Code

Thaum koj ua tiav tsim koj qhov kev sib txuas ntawm lub khob cij thiab sau coding, koj yuav tsum tso cov lej nkag rau hauv NodeMCU los ntawm kev siv lub micro USB.

Tam sim no, mus rau Cov Cuab Yeej> Pawg Thawj Coj> ESP8266 Cov Qauv thiab koj tuaj yeem pom ntau txoj hauv kev rau ESP8266. Xaiv "NodeMCU 1.0 (ESP-12E Module). Tom ntej no, xaiv koj qhov chaw nres nkoj. Yog tias koj tsis tuaj yeem lees paub koj qhov chaw nres nkoj, mus rau Control Panel> System> Device Manager> Port thiab hloov kho koj tus tsav USB.

Tam sim no upload cov cai rau lub rooj tsavxwm.

Kauj Ruam 6: Tswj LED

Tswj lub LED
Tswj lub LED
Tswj lub LED
Tswj lub LED
Tswj lub LED
Tswj lub LED
Tswj lub LED
Tswj lub LED
  • Tam sim no qhib koj li Serial Monitor, thiab tsis yog qhov URL.
  • Tam sim no muab qhov URL tso rau hauv koj lub xov tooj browser.
  • Ib nplooj ntawv yuav qhib muaj ob lub khawm ON thiab OFF.
  • Yog tias txhua yam yog qhov raug thaum koj nias ON LED yuav ci thiab thaum koj nias OFF LED yuav tua.

Pom zoo: