Cov txheej txheem:

Txuas Arduino WiFi rau Huab Siv ESP8266: 7 Cov Kauj Ruam
Txuas Arduino WiFi rau Huab Siv ESP8266: 7 Cov Kauj Ruam

Video: Txuas Arduino WiFi rau Huab Siv ESP8266: 7 Cov Kauj Ruam

Video: Txuas Arduino WiFi rau Huab Siv ESP8266: 7 Cov Kauj Ruam
Video: Computer Vision with Python! Resizing Images 2024, Hlis ntuj nqeg
Anonim
Txuas Arduino WiFi rau Huab Siv ESP8266
Txuas Arduino WiFi rau Huab Siv ESP8266

Hauv qhov kev qhia no peb yuav piav qhia koj li cas txuas koj Arduino mus rau IoT huab los ntawm WiFi.

Peb yuav teeb tsa teeb tsa los ntawm Arduino thiab ESP8266 WiFi module ua IoT Yam thiab ua kom nws npaj tau sib txuas lus nrog AskSensors huab.

Cia peb pib!

Kauj ruam 1: teeb tsa AskSensors

Raws li thawj kauj ruam peb yuav tsum teeb tsa tus as khauj ntawm AskSensors IoT platform. AskSensors yog IoT platform muab kev sib txuas lus ntawm cov khoom siv txuas nrog internet thiab huab. Nws muab cov lej sim dawb yog li koj tsis tas yuav qhib koj lub hnab nyiaj kom pib!

Kuv pom zoo kom ua raws qhov pib ua phau ntawv qhia no. Qhov no yuav qhia koj yuav tsim thiab account li cas thiab teeb tsa lub ntsuas tshiab kom xa cov ntaub ntawv mus rau.

Kauj Ruam 2: Npaj Kho Vajtse

Npaj Kho Vajtse
Npaj Kho Vajtse

Hauv qhov kev ua qauv qhia no peb yuav xav tau cov cuab yeej hauv qab no:

  1. Arduino, Kuv tab tom siv Arduino Uno
  2. ESP8266 WiFi Module, Kuv siv ESP-01S
  3. Khoos phis tawj siv Arduino IDE
  4. Arduino USB cable
  5. Cov xov thiab ib lub khob cij

Daim duab saum toj no qhia kuv daim qauv.

Kauj Ruam 3: Tsim Kho Vajtse

Tsim Kho Vajtse
Tsim Kho Vajtse

Kev sib txuas ntawm Arduino thiab ESP8266 yog raws li hauv qab no:

  • ESP TX rau Arduino tus pin 10, dhau 1K resistor.
  • ESP RX rau Arduino tus pin 11, dhau 1K resistor.
  • ESP VCC rau Arduino 3V3
  • ESP CH_PD rau Arduino 3V3
  • ESP GND rau Arduino GND

Nco tseg: ESP8266 GPIOs xav tau 3V3 cov cim (tsis yog 5V sib txawv). Txhawm rau hack sai, koj tsuas tuaj yeem ntxiv tus lej tiv thaiv ntawm 1K ntawm Arduino pins thiab ESP8266 tus pin los tiv thaiv ESP8266 GPIOs los ntawm kev puas tsuaj. Txawm li cas los xij, rau kev tsim khoom, yuav tsum tau hloov 5V/3V3 qib kom ntseeg tau tias muaj kev ntseeg tau mus ntev. Koj tuaj yeem tshawb xyuas nplooj ntawv no kom tau txais 5V/3V3 qib shifter module.

Kauj Ruam 4: Sau Txoj Cai

Tam sim no cia peb sau cov cai kom xa cov ntaub ntawv yooj yim los ntawm Arduino mus rau AskSensors huab los ntawm WiFi. Tus lej Arduino sib tham nrog ESP8266 WiFi module siv AT cov lus txib. Cov ntaub ntawv yuav raug xa mus rau AskSensors hla HTTP kev txuas.

Peb yuav xav tau muab 'Api Key In' uas peb tau txais yav dhau los los ntawm AskSensors txhawm rau xa cov ntaub ntawv mus rau qhov tseeb Sensor hauv huab.

Npaj Siv Cov Cai:

Kev npaj siv tus lej tau muab rau hauv AskSensors github nplooj ntawv. Rub tawm cov cai thiab teeb tsa qhov sib txawv hauv qab no rau koj teeb tsa (WiFi SSID, tus password thiab 'Api Key In'):

String ssid = "…………."; // Wifi SSID

String password = "…………."; // Wifi Password String apiKeyIn = "………….”; // API Ntsiab

Kauj ruam 5: Khiav Code

Khiav Txoj Cai
Khiav Txoj Cai
Khiav Txoj Cai
Khiav Txoj Cai

Tam sim no nws yog lub sijhawm los txuas koj lub rooj tsavxwm.

  1. Txuas Arduino rau koj lub computer los ntawm USB cable.
  2. Qhib Arduino IDE thiab nyem qhov chaws.
  3. Qhib lub davhlau ya nyob twg. Koj yuav tsum pom koj Arduino ua haujlwm AT cov lus txib nrog ESP8266 uas ua haujlwm txuas rau WiFi tes hauj lwm thiab xa cov ntaub ntawv mus rau AskSensors huab dhau HTTP thov.

Kauj Ruam 6: Pom Koj Cov Ntaub Ntawv

Pom Koj Cov Ntaub Ntawv
Pom Koj Cov Ntaub Ntawv

Koj tuaj yeem pom koj cov ntaub ntawv siv duab. Mus rau koj lub AskSensors dashboard thiab qhib lub sensor uas koj tab tom xa cov ntaub ntawv rau. AskSensors tso cai rau tus neeg siv kom pom koj cov ntaub ntawv hauv ntau hom kab ntawv suav nrog Kab, Kev Ntsuas, kev tawg thiab Bar. Cov duab txuas nrog qhia pom rooj plaub ntawm Kab teeb.

Koj yuav xav tau:

Lwm qhov kev ua haujlwm tau muaj xws li pom cov ntaub ntawv hauv daim duab tag nrho Live stream, qhia koj lub teeb nrog lwm cov apps thiab cov siv, xa cov ntaub ntawv hauv CSV cov ntaub ntawv thiab ntau ntxiv!

Kauj ruam 7: Ua tau zoo

Kuv vam tias qhov kev qhia no tau pab koj!

Thov xa mus rau daim ntawv teev cov kev qhia no yog tias koj xav tau kev txhawb nqa txog kev txuas cov cuab yeej xws li Arduino, ESP8266, ESP32, Raspberry Pi mus rau huab.

Pom zoo: