Cov txheej txheem:

Yuav Ua Li Cas Txuas ESP8266 NodeMCU rau IoT Cloud: 5 Kauj Ruam
Yuav Ua Li Cas Txuas ESP8266 NodeMCU rau IoT Cloud: 5 Kauj Ruam

Video: Yuav Ua Li Cas Txuas ESP8266 NodeMCU rau IoT Cloud: 5 Kauj Ruam

Video: Yuav Ua Li Cas Txuas ESP8266 NodeMCU rau IoT Cloud: 5 Kauj Ruam
Video: How I Made this Electric Car that can go Anywhere 2024, Kaum ib hlis
Anonim
Yuav Ua Li Cas Txuas ESP8266 NodeMCU rau IoT Cloud
Yuav Ua Li Cas Txuas ESP8266 NodeMCU rau IoT Cloud

Cov lus qhia no qhia koj yooj yim Internet ntawm Yam ua piv txwv siv ESP8266 NodeMCU thiab kev pabcuam online IoT hu ua AskSensors. Peb ua rau koj pom sai npaum li cas tau txais cov ntaub ntawv los ntawm ESP8266 HTTPS tus thov thiab npaj nws hauv kab lus rau hauv AskSensors IoT Platform.

Kauj Ruam 1: Cov Khoom Uas Koj Xav Tau

Cov Khoom Koj Xav Tau
Cov Khoom Koj Xav Tau

Txhawm rau ua raws nrog cov lus qhia no koj yuav xav tau yooj yim:

  1. Khoos phis tawj siv software arduino
  2. ESP8266 Node MCU
  3. USB micro cable txuas lub MCU ntawm lub computer.

Kauj Ruam 2: Sau Npe Rau AskSensors

Ua ntej, Tsim tus lej tshiab ntawm AskSensors. Koj yuav tau txais email uas muaj txhua cov lus qhia uas koj xav tau ua raws rau tus ID nkag mus (Nws yooj yim heev).

Ua raws cov lus qhia pib no uas piav qhia koj li cas tsim thiab teeb tsa lub Sensor tshiab yog li peb yuav tuaj yeem sau cov ntaub ntawv rau lub ntsuas cua no. Nov yog cov kauj ruam tseem ceeb:

  1. Nyem rau 'Sensor tshiab' los tsim kev sib txuas lus channel nrog tus lej tshwj xeeb thiab Api Keys. Muab lub npe thiab lus piav qhia rau koj lub sensor.
  2. Ntxiv ib qho qauv rau cov ntaub ntawv koj yuav npaj.
  3. Luam tawm qhov Api Key Hauv tus nqi. Peb yuav siv tus lej ESP8266 tom qab.

Kauj Ruam 3: Sau Txoj Cai

Piv txwv li kos duab thiab ESP8266 WIFI cov tsev qiv ntawv muaj nyob hauv github. Qhov muab cov cai tau npaj siv raws li yog. Nws txuas ESP8266 mus rau wireless network ua HTTPS tus thov, thiab tom qab ntawd thawb cov ntaub ntawv mus rau AskSensors txhua 25 vib nas this. Koj yuav tsum tau sau cov hauv qab no:

  • Koj li WIFI SSID thiab tus password.
  • Tus Api Key Hauv tsim ua ntej los ntawm AskSensors.
  • Yog tias xav tau, lub sijhawm nruab nrab ntawm ob qhov kev hloov pauv cov ntaub ntawv txuas ntxiv (teeb tsa rau 25 thib ob hauv qhov piv txwv no).

// Wifi teeb tsa

const char* wifi_ssid = "………."; // SSID const char* wifi_password = "………."; // WIFI

const char* apiKeyIn = "………."; // API KEY IN, piv txwv: FALOAPPKH17ZR4Q23A8U9W0XPJL0F6OG

ncua (25000); // ncua 25sec

Kauj ruam 4: Khiav Code

Khiav Txoj Cai
Khiav Txoj Cai
Khiav Txoj Cai
Khiav Txoj Cai
  1. Qhib Arduino IDE thiab xa cov cai rau hauv ESP8266 nodeMCU. Ua raws cov lus qhia no yog tias koj tseem xav tau pib nrog kev sau ntawv ESP8266 ESP-12E NodeMCU siv Arduino IDE.
  2. Rov qab mus rau koj nplooj ntawv sensor ntawm nugSensors, nyem rau ntawm 'pom kev' thiab 'Qhia Duab' los saib koj cov ntaub ntawv sensor hauv kab duab.
  3. Qhib cov davhlau ya nyob twg. Koj tuaj yeem hla kev txheeb xyuas kab ntawv nyeem nrog cov txiaj ntsig tau luam tawm ntawm koj Arduino Terminal.

Kauj ruam 5: Ua tiav

Qhov ntawd yog nws!

Ua tsaug rau kev nyeem phau ntawv qhia no!

Koj tuaj yeem sim ntau cov lus qhia ntawm no.

Thaum kawg, koj cov lus tawm tswv yim yuav zoo siab. thov tawm cov lus hauv qab no!

Pom zoo: