Cov txheej txheem:

ThingSpeak, IFTTT, Temp thiab Humidity Sensor thiab Google Sheet: 8 Cov Kauj Ruam
ThingSpeak, IFTTT, Temp thiab Humidity Sensor thiab Google Sheet: 8 Cov Kauj Ruam

Video: ThingSpeak, IFTTT, Temp thiab Humidity Sensor thiab Google Sheet: 8 Cov Kauj Ruam

Video: ThingSpeak, IFTTT, Temp thiab Humidity Sensor thiab Google Sheet: 8 Cov Kauj Ruam
Video: DHT11 & NodeMCU Tutorial || Humidity & Temperature Monitoring over Thingspeak 2024, Kaum ib hlis
Anonim
ThingSpeak, IFTTT, Temp thiab Humidity Sensor thiab Google Sheet
ThingSpeak, IFTTT, Temp thiab Humidity Sensor thiab Google Sheet

Hauv txoj haujlwm no, peb yuav ntsuas ntsuas kub thiab av noo siv NCD qhov ntsuas kub thiab av noo, ESP32, thiab ThingSpeak. Peb tseem yuav xa qhov ntsuas kub thiab av noo sib txawv mus rau Google Ntawv Siv ThingSpeak thiab IFTTT txhawm rau txheeb xyuas cov ntaub ntawv ntsuas

Kauj ruam 1: Kho vajtse thiab Software xav tau

Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau
Kho vajtse thiab Software yuav tsum tau

Kho vajtse:

  • ESP-32: ESP32 ua kom yooj yim siv Arduino IDE thiab Arduino Wire Language rau IoT daim ntawv thov. Qhov ESp32 IoT Module no sib txuas Wi-nkaus, Bluetooth, thiab Bluetooth BLE rau ntau yam kev siv sib txawv. Cov qauv no tau los ua tiav nrog 2 CPU cores uas tuaj yeem tswj tau thiab siv zog ib tus zuj zus, thiab nrog lub moos hloov pauv tau ntawm 80 MHz txog 240 MHz. Qhov ESP32 IoT WiFi BLE Module nrog Kev Sib Txuas USB tau tsim los kom haum rau txhua qhov khoom ncd.io IoT. Saib xyuas cov ntsuas thiab tswj kev xa tawm, FETs, PWM cov tswj, solenoids, li qub, lub cev muaj zog thiab ntau ntxiv los ntawm txhua qhov chaw hauv ntiaj teb no siv nplooj ntawv web lossis nplooj siab rau server. Peb tsim peb tus kheej version ntawm ESP32 kom haum rau NCD IoT cov cuab yeej, muab cov kev xaiv nthuav dav ntau dua li lwm yam cuab yeej hauv ntiaj teb! Kev koom ua ke USB chaw tso cai yooj yim ntawm ESP32. ESP32 IoT WiFi BLE Module yog lub platform zoo kawg rau IoT daim ntawv thov txhim kho. Qhov ESP32 IoT WiFi BLE Module no tuaj yeem tsim kho siv Arduino IDE.
  • IoT Long Range Wireless Kub Thiab Vaum Sensor: Muaj Ntau Yam Wireless Wireless Kub Kub Sensor. Qib nrog Sensor Kev daws teeb meem ntawm ± 1.7%RH ± 0.5 ° C. Txog li 500, 000 Kev Tshaj Tawm los ntawm 2 AA Roj Teeb. Kev ntsuas -40 ° C txog 125 ° C nrog Cov Roj Teeb uas Ciaj sia Cov Kev Ntsuas no. Zoo Tshaj 2-mais LOS Range & 28 mais nrog High-Gain Antennas. Interface rau Raspberry Pi, Microsoft Azure, Arduino, thiab Ntau Ntxiv.
  • Ntev-Ntau Wireless Wireless Mesh Modem nrog USB Interface

Siv Software

  • Arduino IDE Cov
  • ThingSpeak
  • IFTTT

Qiv Siv

  • PubSubClient Library
  • Hlau.h

Arduino Client rau MQTT

Lub tsev qiv ntawv no muab cov neeg siv khoom los ua qhov yooj yim tshaj tawm/sau npe xa xov nrog lub server uas txhawb MQTT Yog xav paub ntxiv txog MQTT, mus saib mqtt.org.

Rub tawm

Qhov hloov tshiab kawg ntawm lub tsev qiv ntawv tuaj yeem rub tawm los ntawm GitHub

Cov ntaub ntawv

Lub tsev qiv ntawv los nrog tus lej piv txwv piv txwv. Saib Cov Ntaub Ntawv> Piv Txwv> PubSubClient hauv Arduino daim ntawv thov. Cov ntaub ntawv API tag nrho

Kho vajtse sib xws

Lub tsev qiv ntawv siv Arduino Ethernet Client API rau kev cuam tshuam nrog cov khoom siv sib txuas hauv qab. Qhov no txhais tau tias Nws Tsuas Ua Haujlwm nrog cov naj npawb ntawm cov laug cam thiab cov tiv thaiv, suav nrog:

  • Arduino Ethernet
  • Arduino Ethernet Shield
  • Arduino YUN - siv suav nrog YunClient nyob rau hauv qhov chaw ntawm EthernetClient, thiab nco ntsoov ua Bridge.begin () thawj Arduino WiFi Shield - yog tias koj xav xa cov pob ntau dua 90 bytes nrog daim thaiv no, pab kom MQTT_MAX_TRANSFER_SIZE xaiv hauv PubSubClient.h.
  • SparkFun WiFly Shield - thaum siv nrog lub tsev qiv ntawv no
  • Intel Galileo/Edison
  • ESP8266
  • ESP32 Tam sim no lub tsev qiv ntawv tsis tuaj yeem siv nrog kho vajtse raws li ENC28J60 nti - xws li Nanode lossis Nuelectronics Ethernet Shield. Rau cov ntawd, muaj lwm lub tsev qiv ntawv muaj.

Cov Tsev Qiv Hlau

Lub tsev qiv ntawv Hlau tso cai rau koj sib txuas lus nrog I2C cov cuab yeej, feem ntau tseem hu ua "2 xaim" lossis "TWI" (Ob Txoj Kev Siv Hluav Taws Xob), tuaj yeem rub tawm los ntawm Wire.h

Kev Siv Yooj Yim

  • Wire.begin () Pib siv Wire hauv hom tswv, qhov uas koj yuav pib thiab tswj cov ntaub ntawv xa mus. Qhov no yog qhov siv ntau tshaj thaum cuam tshuam nrog feem ntau I2C cov khoom siv sab hauv.
  • Wire.begin (chaw nyob) Pib siv Wire hauv hom qhev, qhov uas koj yuav teb ntawm "chaw nyob" thaum lwm I2C masters chips pib sib tham. Kev Tshaj Tawm Wire.beginTransmission (chaw nyob) Pib kis tshiab rau lub cuab yeej ntawm "chaw nyob". Master hom yog siv.
  • Wire.write (cov ntaub ntawv) Xa cov ntaub ntawv. Nyob rau hauv hom tswv, pibTransmission yuav tsum raug hu ua ntej.
  • Wire.endTransmission () Hauv hom kev ua haujlwm, qhov no xaus qhov kev sib kis thiab ua rau tag nrho cov ntaub ntawv tsis raug xa mus.

Txais

  • Wire.requestFrom (chaw nyob, suav) Nyeem "suav" bytes los ntawm ib lub cuab yeej ntawm "chaw nyob". Master hom yog siv.
  • Wire.available () Rov qab tus naj npawb ntawm bytes muaj los ntawm kev hu xov tooj txais.
  • Wire.read () Tau txais 1 byte.

Kauj Ruam 2: Tshaj Tawm Txoj Cai rau ESP32 Siv Arduino IDE

  • Ua ntej rub tawm cov cai koj tuaj yeem pom qhov ua haujlwm ntawm lub ntsuas cua ntawm qhov muab txuas.
  • Rub tawm thiab suav nrog PubSubClient Library thiab Wire.h Library.
  • Koj yuav tsum muab koj tus lej API, SSID (WiFi Lub Npe) thiab Lo lus zais ntawm lub network muaj.
  • Sau thiab xa cov cai Temp-ThinSpeak.ino.
  • Txhawm rau txheeb xyuas qhov kev sib txuas ntawm lub cuab yeej thiab cov ntaub ntawv xa mus, qhib lub ntsuas saib. Yog tias tsis pom cov lus teb, sim tshem koj lub ESP32 thiab tom qab ntawd txuas nws dua. Nco ntsoov tias tus nqi baud ntawm Serial monitor tau teeb tsa rau tib qho uas tau teev tseg hauv koj tus lej 115200.

Kauj Ruam 3: Serial Monitor Output

Serial Monitor Output
Serial Monitor Output

Kauj Ruam 4: Tso Tawm

Tso zis
Tso zis

Kauj Ruam 5: Tsim IFTTT Applet

Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
Tsim IFTTT Applet
  • Txhawm rau xa cov ntaub ntawv mus rau ThingSpeak koj tuaj yeem pom nws ntawm qhov txuas no.
  • IFTTT yog qhov kev pabcuam web uas tso cai rau koj tsim cov applets uas ua haujlwm hauv kev teb rau lwm qhov kev nqis tes ua. Koj tuaj yeem siv IFTTT Webhooks kev pabcuam los tsim lub vev xaib thov kom ua rau muaj kev nqis tes ua. Qhov kev nqis tes tuaj yog HTTP thov mus rau lub vev xaib, thiab qhov ua tawm yog email lus.
  • Ua ntej, tsim ib tus as khauj IFTTT.
  • Tsim ib qho applet. Xaiv Kuv Applets.
  • Nyem rau khawm Applet tshiab.
  • Xaiv qhov kev nqis tes ua. Nyem lo lus no.
  • Nyem rau Webhooks kev pabcuam. Nkag mus rau Webhooks hauv kev tshawb nrhiav. Xaiv Webhooks.
  • Xaiv tus txhais.
  • Ua kom tiav cov teb txhais. Tom qab koj xaiv Webhooks ua tus txhais, nyem rau Txais Txais lub vev xaib lub npov kom txuas ntxiv. Sau lub npe txheej xwm
  • Tsim txhais.
  • Tam sim no tus txhais tau tsim, rau qhov ua rau nyem qhov ntawd.
  • Nkag mus "Google Ntawv" hauv kab tshawb nrhiav, thiab xaiv lub thawv "Google Ntawv".
  • Yog tias koj tsis tau txuas nrog Google Sheet, tom qab ntawv txuas nws ua ntej. Tam sim no xaiv ua. Xaiv ntxiv kab rau daim ntawv nthuav qhia.
  • Tom qab ntawd, ua tiav cov haujlwm ua.
  • Koj daim ntawv thov yuav tsum tsim tom qab koj nias qhov ua tiav.
  • Rov qab tau koj cov ntaub ntawv qhia txog Webhooks. Xaiv Kuv Cov Applets, Cov Kev Pabcuam thiab tshawb rau Webhooks. Nyem Webhooks thiab Cov Ntaub Ntawv khawm. Koj pom koj tus yuam sij thiab hom ntawv rau xa daim ntawv thov. Sau lub npe txheej xwm. Lub npe txheej xwm rau qhov piv txwv no yog VibrationAndTempData.

Kauj Ruam 6: Tsim Kev Ntsuas MATLAB

Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis
Tsim MATLAB Analysis

Koj tuaj yeem siv qhov txiaj ntsig ntawm koj qhov kev tshuaj xyuas los ua kom lub vev xaib thov, xws li sau qhov txhais rau IFTTT.

  • Nyem Apps, MATLAB Txheeb Xyuas thiab xaiv Tshiab.
  • Xaiv Trigger Email los ntawm IFTTT hauv ntu Piv txwv. Cov cai hauv qab no tau npaj ua ntej hauv koj lub MATLAB tsom xam qhov rai.
  • Npe koj qhov kev tshuaj xyuas thiab hloov kho cov cai.
  • Txuag koj qhov kev tshuaj xyuas MATLAB.

Kauj Ruam 7: Tsim Kev Tswj Sijhawm los Ua Koj Li Kev Tshawb Fawb

Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas
Tsim Kev Tswj Sijhawm kom Ua Haujlwm Koj Qhov Kev Ntsuam Xyuas

Ntsuam xyuas koj li ThingSpeak cov ntaub ntawv channel thiab ua rau lwm yam xwm txheej.

  • Nyem rau Apps, TimeControl, thiab tom qab ntawd nyem Tshiab TimeControl.
  • Txuag koj Lub Sijhawm Tswj.

Pom zoo: