Cov txheej txheem:
- Kauj ruam 1: HARDWARE THIAB SOFTWARE YUAV TSUM TAU
- Kauj Ruam 2: Tshaj Tawm Txoj Cai rau ESP32 Siv Arduino IDE:
- Kauj Ruam 3: Serial Monitor Output
- Kauj Ruam 4: Ua kom AWS Ua Haujlwm
- Kauj Ruam 5: Tsim Txoj Cai
- Kauj Ruam 6: Ntxiv Tus Kheej Ntiag Tug, Daim Ntawv Pov Thawj thiab Root_CA rau Code
- Kauj Ruam 7: Tau Txais Kev Tso Tawm-
Video: Saib Xyuas-Temp-thiab-Vaum-siv-AWS-ESP32: 8 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:26
Hauv qhov kev qhia no, peb yuav ntsuas qhov sib txawv ntawm qhov kub thiab txias cov ntaub ntawv siv Temp thiab humidity sensor. Koj tseem yuav kawm paub xa cov ntaub ntawv no mus rau AWS
Kauj ruam 1: HARDWARE 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 Daws Teeb Meem ntawm ± 1.7%RH ± 0.5 ° C. Ua li 500, 000 Kev xa tawm los ntawm 2 AA Roj Teeb. Measure -40 ° C txog 125 ° C nrog Cov Roj Teeb uas Ciaj sia Cov Kev Ntsuas no. Zoo Tshaj 2 -mais LOS Ntau & 28 mais nrog High-Gain Antennas. Interface rau Raspberry Pi, Microsoft Azure, Arduino thiab Ntau
- Long-Range Wireless Mesh Modem nrog USB InterfaceLong-Range Wireless Mesh Modem nrog USB Interface
Siv Software:
- Arduino IDE Cov
- AWS
Tsev qiv ntawv siv:
- PubSubClient Library
- Hlau.h
- AWS_IOT.h
Kauj Ruam 2: Tshaj Tawm Txoj Cai rau ESP32 Siv Arduino IDE:
Raws li esp32 yog ib feem tseem ceeb tshaj tawm koj cov ntaub ntawv kub thiab av noo rau AWS.
- Rub tawm thiab suav nrog PubSubClient Library, Wire.h Library, AWS_IOT.h, Wifi.h.
- Rub tawm Zip cov ntaub ntawv ntawm AWS_IoT, los ntawm qhov muab txuas thiab tom qab muab rho tawm, muab cov tsev qiv ntawv tso rau hauv koj lub tsev qiv ntawv Arduino.
#suav nrog
#include <AWS_IOT.h #include #include #include
- Koj yuav tsum muab koj lub AWS tshwj xeeb MQTT_TOPIC, AWS_HOST, SSID (WiFi Npe) thiab Lo lus zais ntawm lub network muaj.
- MQTT lub ncauj lus thiab AWS HOST tuaj yeem sab hauv Yam-Sib Tham ntawm AWS-IoT console.
#define WIFI_SSID "xxxxx" // koj wifi ssid
#define WIFI_PASSWD "xxxxx" // your wifi password #define CLIENT_ID "xxxxx" // yam tshwj xeeb ID, tuaj yeem yog ib tus cim tshwj xeeb #define MQTT_TOPIC "xxxxxx" // ncauj lus rau MQTT cov ntaub ntawv #define AWS_HOST "xxxxxx" // koj host for uploading data to AWS
Txheeb xyuas lub npe sib txawv uas cov ntaub ntawv yuav xa mus rau AWS
koj temp;
int Vaum;
Code to publish data to AWS:
yog (temp == NAN || Vaum == NAN) {// NAN txhais tau tias tsis muaj cov ntaub ntawv
Serial.println ("Nyeem tsis tau."); } lwm tus {// tsim txoj hlua them nyiaj rau tshaj tawm Txoj hlua temp_humidity = "Kub:"; temp_humidity += Txoj hlua (temp); temp_humidity += "° C Vaum:"; temp_humidity += Txoj hlua (Vaum); temp_humidity += " %";
temp_humidity.toCharArray (payload, 40);
Serial.println ("Luam tawm:-"); Serial.println (them nyiaj); if (aws.publish (MQTT_TOPIC, payload) == 0) {// luam tawm payload thiab xa rov qab 0 thaum ua tiav Serial.println ("Success / n"); } lwm {Serial.println ("Failed! / n"); }}
- Sau thiab xa cov cai theESP32_AWS.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
Kauj Ruam 4: Ua kom AWS Ua Haujlwm
TSHUAB NTAWV THIAB CERTIFICATE
THING: Nws yog qhov sawv cev virtual ntawm koj lub cuab yeej.
CERTIFICATE: Pov thawj qhov tseeb ntawm tus THING.
- Open AWS-IoT.
- Nyem rau ntawm tswj -THING -Register THING.
- Nyem rau tsim ib yam nkaus.
- Muab lub npe thiab hom.
- Nyem rau tom ntej no.
- Tam sim no koj daim ntawv pov thawj nplooj ntawv yuav qhib, Nyem rau Tsim Daim Ntawv Pov Thawj.
- Rub tawm cov Ntawv Pov Thawj no, feem ntau yog tus yuam sij ntiag tug, daim ntawv pov thawj rau qhov no thiab root_ca thiab khaws cia rau hauv cov ntawv cais. daim ntawv pov thawj ntawv tais ceev tseg.
Kauj Ruam 5: Tsim Txoj Cai
Nws txiav txim siab qhov haujlwm twg lub cuab yeej lossis tus neeg siv tuaj yeem nkag tau.
- Mus rau AWS-IoT interface, Nyem rau Secure-Policies.
- Nyem rau Tsim.
- Sau tag nrho cov ntsiab lus tsim nyog xws li lub npe txoj cai, Nyem Tsim.
- Tam sim no rov qab mus rau AWS-IoT interface, Nyem rau Secure-Certificates thiab txuas txoj cai tsim tam sim no rau nws.
Kauj Ruam 6: Ntxiv Tus Kheej Ntiag Tug, Daim Ntawv Pov Thawj thiab Root_CA rau Code
- Qhib koj daim ntawv pov thawj rub tawm hauv koj cov ntawv sau (Notepad ++), feem ntau yog tus yuam sij ntiag tug, root_CA thiab daim ntawv pov thawj ntawm yam thiab kho lawv raws li muab hauv qab no.
- Tam sim no qhib koj daim ntawv AWS_IoT hauv koj lub tsev qiv ntawv Arduino -My Document. Mus rau C: / Users / xyz / Documents / Arduino / libraries / AWS_IOT / src, nyem rau ntawm aws_iot_certficates.c, qhib nws ntawm tus editor thiab muab tag nrho cov ntawv pov thawj kho lawv nyob ntawm qhov chaw xav tau, txuag nws.
Kauj Ruam 7: Tau Txais Kev Tso Tawm-
- Mus sim hauv AWS_IoT console.
- Sau koj li MQTT cov ncauj lus rau Cov npe sau npe hauv koj daim ntawv pov thawj xeem.
- Tam sim no koj tuaj yeem saib koj cov ntaub ntawv huab cua thiab av noo.
Pom zoo:
Saib Lub Cev Uas Muaj peev xwm Saib Xyuas Kab Mob Loj Hlob: 14 Kauj Ruam
Saib Lub Cev Uas Tuaj Saib Xyuas Kev Loj Hlob Ntawm Kab Mob: Cov kab mob ua lub luag haujlwm tseem ceeb hauv peb lub neej. Lawv tuaj yeem muaj txiaj ntsig zoo thiab muab tshuaj rau peb, npias, khoom noj khoom haus thiab lwm yam. Kev saib xyuas tas li ntawm theem kev loj hlob thiab kev mob siab rau ntawm cov kab mob hauv lub cev yog txheej txheem tseem ceeb. Nov yog ib qho tseem ceeb ntawm
Kev Saib Xyuas Tus Kheej Ntiag Tug Hacked Los Ntawm Cov Laus LCD Saib: 7 Kauj Ruam (nrog Duab)
Kev Saib Xyuas Tus Kheej Ntiag Tug Los Ntawm Lub Luag Qub LCD: Thaum kawg koj tuaj yeem ua qee yam nrog lub qub LCD saib uas koj muaj hauv lub nkas -las. Koj tuaj yeem tig nws mus ua tus saib xyuas ntiag tug! Nws zoo nkaus li dawb rau txhua tus neeg tshwj tsis yog koj, vim tias koj hnav "khawv koob" tsom iav! Txhua yam koj yuav tsum muaj yog pa
Cov Lus Ceeb Toom Txog Dej Nyab - Cov Dej Dej + IoT Sensor Saib Xyuas Phau Ntawv Qhia: 6 Cov Kauj Ruam
Cov Lus Ceeb Toom Txog Dej Nyab - Cov Dej Dej + IoT Sensor Phau Ntawv Qhia Saib Xyuas: Koj puas xav tau los saib xyuas cov qib dej? Cov Khoom Siv IoT no tau siv los ua kev ceeb toom txog dej nyab hauv Asmeskas. Txhawm rau kom koj thiab koj lub zej zog muaj kev nyab xeeb, Lub Nroog Ntsej Muag yuav tsum tau
Kev Kawm Lub Plawv Tus Kheej Saib Xyuas Zaum Saib: 19 Cov Kauj Ruam (nrog Duab)
Kev cob qhia Lub Plawv Tus Kheej Saib Xyuas Zaum Saib: Tsev Kawm Qib Siab yog lub sijhawm nyuaj thiab ntxhov siab hauv ib tus neeg lub neej, yog vim li ntawd nws thiaj tseem ceeb heev kom koj qhov kev nyuaj siab nyob qis. Ib txoj hauv kev peb nyiam ua qhov no yog los ntawm kev ua haujlwm, nws pab ua kom koj lub siab meej thiab lub cev zoo. Tias yog vim li cas peb tsim lub portabl
Hloov VGA Saib Xyuas Splitter Rau Hauv Computer-tswj Saib Switcher: 4 Cov Kauj Ruam
Hloov pauv VGA Saib Xyuas Splitter Rau Hauv Computer-tswj Saib Switcher: Cov lus qhia no piav qhia yuav ua li cas pheej yig (20 EURO) VGA saib splitter uas yog siv los txuas ib lub PC rau ob lub saib tuaj yeem hloov pauv mus rau hauv lub computer tswj-saib switcher. Cov cuab yeej kawg yog tswj ntawm qhov chaw nres nkoj sib luag thiab tso cai rau tur