Cov txheej txheem:

IOT Raws Li Kev Saib Xyuas Kev Noj Qab Haus Huv: 3 Kauj Ruam
IOT Raws Li Kev Saib Xyuas Kev Noj Qab Haus Huv: 3 Kauj Ruam

Video: IOT Raws Li Kev Saib Xyuas Kev Noj Qab Haus Huv: 3 Kauj Ruam

Video: IOT Raws Li Kev Saib Xyuas Kev Noj Qab Haus Huv: 3 Kauj Ruam
Video: Plab Plab Ntswg..(Pluav Pluav Ntswg) Maiv Twm New Song 2023-2024 2024, Kaum ib hlis
Anonim
IOT Raws Li Kev Saib Xyuas Kev Noj Qab Haus Huv
IOT Raws Li Kev Saib Xyuas Kev Noj Qab Haus Huv

Ib lub cuab yeej tswj hwm microcontroller nrog cov cuab yeej kho mob tsim nyog yuav raug txuas rau tus neeg mob kom muab kev saib xyuas huab tas li. Cov cim tseem ceeb piv txwv li qhov ntsuas kub thiab lub plawv dhia ntawm tib neeg lub cev uas yog cov ntsiab lus tseem ceeb txhawm rau txheeb xyuas txhua yam teeb meem kev noj qab haus huv yuav raug los ntawm cov ntsuas tshwj xeeb txhawb los ntawm NodeMCU hauv ib puag ncig Wi-nkaus thiab cov ntaub ntawv yuav raug xa mus rau ThingSpeak huab qhov twg cov ntaub ntawv yuav raug tshuaj xyuas mus nrhiav tej yam tsis xwm yeem. Yog tias muaj qhov tsis xwm yeem ceeb toom yuav xa mus rau kws kho mob thiab kws saib xyuas neeg mob.

Los ntawm cov kab ke no, cov neeg mob tuaj yeem raug saib xyuas tas li yam tsis muaj kev cuam tshuam los ntawm tib neeg lub luag haujlwm ntawm tus nqi qis heev. Qhov no tseem yuav txo qee qhov ua yuam kev thiab pab kws kho mob kom sai rau qhov xwm txheej.

Kauj ruam 1: Kev sib txuas

Kev sib txuas
Kev sib txuas

Yam uas koj xav tau:-

1. Cov qhob cij

2. NodeMCU

3. Pulse sensor

4. DS18B20 qhov ntsuas kub tsis muaj dej

5. Jumper xov hlau

6. 4.7k ohm resistor rau DS18B20

Tam sim no, teeb tsa koj qhov kev sib txuas raws li lub hauv paus muab hauv daim duab.

Kauj ruam 2: Coding thiab Thingspeak

Tshaj tawm cov cai thiab teeb tsa koj cov lus channel kom tau txais cov ntaub ntawv (koj tuaj yeem yooj yim pom ntau cov lus qhia hais txog qhov no hauv is taws nem, tseem yog tias koj muaj teeb meem koj tuaj yeem tawm lus hauv qab no).

Xyuas kom tseeb tias daim teb 1 yog rau BPM thiab daim teb 2 yog rau qhov ntsuas kub ntawm koj cov lus channel thiab tom qab ntawd, xaiv NodeMCU ua koj pawg thawj coj (koj yuav tsum rub tawm lub rooj tsav xwm no vim nws tsis tau ntxiv los ntawm lub neej ntawd, koj tuaj yeem mus dhau phau ntawv qhia no teeb tsa koj IDE:

Tam sim no, upload cov cai thiab nco ntsoov hloov kho WiFi cov ntaub ntawv pov thawj thiab yam khoom API hais kom haum raws li tus lej ua ntej rub tawm.

Kauj Ruam 3: Xaiv tau

Koj tuaj yeem tsim email ceeb toom raws li:

in.mathworks.com/help/thingspeak/analyze-c…

Nov yog phau ntawv qhia teeb tsa nws.

Txoj Cai:

channelID = Koj_channel_ID;

iftttURL = 'Koj_IFTTT_URL';

readAPIKey = 'nyeem_API_key';

bpm = thingSpeakRead (channelID, 'Field', 1, 'ReadKey', readAPIKey);

temp = thingSpeakRead (channelID, 'Field', 2, 'ReadKey', readAPIKey);

tempf = (temp*9/5) +32;

yog (bpm100 | temp37.2)

webwrite (iftttURL, 'value1', bpm, 'value2', temp, 'value3', tempf);

kawg

Pom zoo: