Cov txheej txheem:

NODE MCU-LED Tswj (Lub Tsev Yooj Yim Automation): 5 Kauj Ruam
NODE MCU-LED Tswj (Lub Tsev Yooj Yim Automation): 5 Kauj Ruam

Video: NODE MCU-LED Tswj (Lub Tsev Yooj Yim Automation): 5 Kauj Ruam

Video: NODE MCU-LED Tswj (Lub Tsev Yooj Yim Automation): 5 Kauj Ruam
Video: Blink External LED Using NodeMCU ESP8266 2024, Hlis ntuj nqeg
Anonim
NODE MCU-LED Tswj (Lub Tsev Yooj Yim Automation)
NODE MCU-LED Tswj (Lub Tsev Yooj Yim Automation)

Nyob Zoo Cov Menyuam, Hauv Cov Lus Qhia no qhia rau peb pom yuav ua li cas tswj lub teeb LED siv koj li Smartphone.

Peb yuav siv Node-MCU rau txoj haujlwm no.

Xa mus rau qhov txuas hauv qab no txhawm rau nruab Node MCU cov tsev qiv ntawv (ESP cov tsev qiv ntawv) hauv koj Arduino IDE.

NODE MCU-BASICS

{Ua raws Kauj Ruam 1 txog Kauj Ruam 3 (Cov kauj ruam tseem ceeb) thiab

kauj ruam 1 txog qib 3 (Cov theem qis) hauv Kauj Ruam 4 los ntawm qhov txuas saum toj no}

Kauj Ruam 1: Cov Cheeb Tsam Yuav Tsum Tau

Cov Cheeb Tsam Yuav Tsum Tau
Cov Cheeb Tsam Yuav Tsum Tau
Cov Cheeb Tsam Yuav Tsum Tau
Cov Cheeb Tsam Yuav Tsum Tau
Cov Cheeb Tsam Yuav Tsum Tau
Cov Cheeb Tsam Yuav Tsum Tau
  1. NUJ MCU
  2. Txiv neej rau Poj niam jumper hlau
  3. 3mm LED teeb
  4. Lub Hwj Huam Muaj Peev Xwm (tsis ua los tau) Txheeb xyuas qhov "Lub Hwj Huam Muaj Peev Xwm Tshiab" hauv peb qhov blog.

Kauj Ruam 2: Kev Txuas Hluav Taws Xob

Kev Txuas Hluav Taws Xob
Kev Txuas Hluav Taws Xob

Txuas lub LED + (Tus pin ntev dua) rau (GPIO-13) D7 Pin ntawm Node MCU

Txuas lub LED - (Tus pin luv) rau GND Pin ntawm Node MCU

(Tsis txhob txuas LED mus rau tus lej PIN saib tus lej tus lej ntawm Node MCU ua tib zoo ua ntej txuas)

Tsis muaj dab tsi loj yuav tshwm sim yog tias koj txuas rau tus pin tsis raug ?? led tsuas yog tsis ci.

Kauj Ruam 3: YUAV TSUM CODE

Xa cov CODE hauv qab no rau koj NODE MCU

TSEEM CEEB:

Hloov koj lub xov tooj Wi-Fi Lub Npe thiab tus lej zais hauv ntu no ntawm cov cai ua ntej rub tawm

const char*ssid = "********"; // Xov tooj Wi-nkaus nameconst char*password = "********"; // Wi-nkaus lo lus zais

(Xaiv lub rooj tsavxwm thiab chaw nres nkoj kom raug los ntawm cov cuab yeej ntawv qhia ua ntej rub tawm)

Kauj ruam 4: Tam sim no Nws Ua Haujlwm

Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!
Tam sim no Nws Ua Haujlwm!

Hloov ON HOTSPOT Ntawm Koj Lub Xov Tooj

Tom qab xa cov cai mus rau pawg thawj coj ua cov theem hauv qab no.

Tshem lub USB ntawm koj lub PC, thiab ntsaws nws rau koj lub txhab nyiaj hluav taws xob.

qhib lub vijtsam txuas (lub cim Magnifier nyob rau sab xis saum toj hauv Arduino IDE qhov rai)

Koj yuav tau txais tus IP chaw nyob

qhib Google Chrome lossis lwm qhov browser hauv koj lub xov tooj thiab ntaus IP Address Raws li nws nyob hauv Serial monitor.

Koj yuav tau txais ib nplooj ntawv, Zoom mus rau sab xis saum toj ntawm nplooj ntawv.

Koj yuav pom ON OFF cov nyees khawm.

Nyem rau ntawm cov nyees khawm kom tswj koj cov LED.

Koj tuaj yeem pom qhov xwm txheej ntawm koj LED hauv kev saib xyuas hauv xov tooj thiab tseem nyob hauv koj lub xov tooj.

Tam sim no Koj tau ua tiav theem pib yooj yim ntawm Cov Menyuam Hauv Tsev Automation.

Khaws kev kawm thiab muaj Txoj Kev Ntev Mus!

Kauj ruam 5: Troubleshooting

Teeb meem
Teeb meem

Yog tias koj lub LED tsis ci:-

  1. Txheeb xyuas yog tias koj tau txuas lub LED rau tus pin raug hauv NODE MCU.
  2. Txheeb xyuas qhov zoo thiab tsis zoo pins kom raug.
  3. Xyuas seb koj lub LED ua haujlwm lossis tsis.

Yog tias koj Tsis tuaj yeem txuas rau koj lub xov tooj:-

  1. Txheeb xyuas yog tias koj tau hloov SSID thiab Password ntawm Koj lub xov tooj hauv thaj chaw cim ntawm tus lej.
  2. Txheeb xyuas qhov ua tsis raug thiab CAPS/Cov Cim Tshwj Xeeb hauv koj li SSID thiab Tus lej zais hauv tus lej.
  3. Txheeb xyuas yog tias koj tau qhib rau koj lub Mobile Hotspot.
  4. Tua tawm Cov Ntaub Ntawv mobile yog xav tau.

Yog tias Koj Tseem Muaj Teeb Meem Tso Rau Koj Pawg Thawj Coj.

Xa mus rau Cov Lus Qhia no:

NODE MCU-BASICS

Pom zoo: