Cov txheej txheem:

Tus Nqi Tsawg Tus Kheej Hauv Tsev - Tswj Los Ntawm Txhua Qhov Chaw Hauv Ntiaj Teb: 6 Kauj Ruam
Tus Nqi Tsawg Tus Kheej Hauv Tsev - Tswj Los Ntawm Txhua Qhov Chaw Hauv Ntiaj Teb: 6 Kauj Ruam

Video: Tus Nqi Tsawg Tus Kheej Hauv Tsev - Tswj Los Ntawm Txhua Qhov Chaw Hauv Ntiaj Teb: 6 Kauj Ruam

Video: Tus Nqi Tsawg Tus Kheej Hauv Tsev - Tswj Los Ntawm Txhua Qhov Chaw Hauv Ntiaj Teb: 6 Kauj Ruam
Video: 6 Nqi Lus Qhia Kev Ua neej ( leej twg mloog lub neej yuav zoo tuaj) 2024, Kaum ib hlis
Anonim
Image
Image

Txog

Tam sim no ob leeg niam txiv tau ua haujlwm kom muaj lub neej zoo rau tsev neeg. Yog li peb muaj ntau yam khoom siv hluav taws xob zoo li Rhaub Dej, AC, Tshuab Ntxhua Khaub Ncaws, thiab lwm yam hauv peb lub tsev.

Thaum lawv rov qab los tsev lawv yuav tsum xis nyob heev ntawm qhov kub thiab txias thiab lwm yam haujlwm. Tab sis niaj hnub no, tom qab nkag mus hauv tsev, lawv yuav tsum hloov pauv txhua yam khoom siv hluav taws xob thiab tos qee lub sijhawm kom pib siv cov khoom siv hluav taws xob zoo li AC, Rhaub, Etc kom xis nyob. Lawv tsis tuaj yeem hloov lub rhaub lossis AC puv hnub uas ua rau siv hluav taws xob ntau dua thiab raug nqi.

Kuv tab tom ua LOW-COST SMART HOME, uas yuav txuas rau hauv is taws nem thiab tuaj yeem tswj hwm cov khoom siv hluav taws xob hauv tsev uas twb muaj lawm los ntawm TXHUA YAM NTIAJ TEB Thoob Ntiaj Teb nrog lawv Android/iPhone mobile nws tus kheej thaum twg lawv xav tau.

Lawv tuaj yeem hloov pauv txhua lub sijhawm thiab txhua daim ntawv thov nrog tus nqi qis (Tsawg dua 40 $)

Cov ntaub ntawv xav tau:

Raspberry pi 3 lossis 4

Teeb los yog Cov Khoom Siv Hluav Taws Xob

Relay

Hlau

Android/iPhone Txawb

Wifi

Kauj Ruam 1: Teeb Koj Raspberry Pi

Tam sim no peb yuav teeb tsa koj li Raspberry Pi, Kauj Ruam 1: Rub tawm Raspbian duab hauv qhov txuas no, Kauj ruam 2: Tsim koj daim npav SD.

Kauj Ruam 3: Teeb duab siv balena Etchen (Rub tawm thiab teeb tsa hauv qhov txuas no

Kauj Ruam 4: Ntxig daim npav SD hauv Raspberry Pi.

Thiab koj ua tiav, nrog Kev teeb tsa koj li Raspberry Pi

Kauj Ruam 2: Teeb Koj Blynk

Kev sib txuas
Kev sib txuas

Tam sim no peb yuav teeb tsa blynk, Koj tuaj yeem rub tawm daim ntawv thov hu ua "blynk" ntawm App Store hauv AppleandPlay Store hauv Android

Tam sim no koj xav tau koj lub xov tooj los teeb tsa Blynk, Kauj ruam 1: mus rau Google Ua Si thiab teeb tsa Blynk

Kauj Ruam 2: Qhib Blynk thiab sau npe nrog koj tus e-mail id

Kauj Ruam 3: Tom qab ntawd, koj yuav tsum tau txais lub qhov rai uas muaj qhov me me, nyem rau ntawm lub qhov rais thiab koj yuav tsum tau txais lub qhov rai ntawm sab xis nyem khawm rau ntawm nws thiab koj yuav tsum pom cov nplais hauv lub qhov rai dots. Nyem rau ntawm qhov ntawd thiab npe koj lub pob, xaiv tus pin ua GPIO2 thiab koj yuav pom 0 thiab 1 txoj cai tom ntej ntawm tus PIN hloov nws li 1 thiab 0

Qhov ntawd yog txhua yam koj xav tau los teeb tsa koj li Blynk

Koj tseem tuaj yeem pom cov vis dis aus hauv qab no kom nkag siab zoo.

Kauj ruam 3: Programming

Ua ntej tshaj plaws, koj yuav tsum teeb tsa Node.js. ntawm koj lub raspberry pi

Ua ntej hloov kho Node.js, thov nco ntsoov tshem cov qub version:

sudo apt -tau tshem tawm ntawm nodejs node.js -y

sudo apt-tau tshem tawm autoremove

Tsis siv neeg Node.js teeb tsa

Ntxiv cov chaw cia khoom:

curl -sL https://deb.nodesource.com/setup_6.x | sudo -E tsoo -

Nruab Node.js:

sudo apt-tau hloov tshiab & sudo apt-tau hloov tshiab

sudo apt-mus nruab tsim-qhov tseem ceeb nodejs -y

Phau ntawv Node.js teeb tsa

Kev nruab tsis siv neeg yuav tsis ua haujlwm rau koj, hauv qhov no, koj tuaj yeem ua tiav kev teeb tsa phau ntawv yog tias tsis muaj npe -m muab rau koj armv6l ntawm Raspberry Pi, sim qhov no:

sudo ua

cd/optwget https://nodejs.org/dist/v6.9.5/node-v6.9.5-linux-… -O-| xas tar

mv node-v6.9.5-linux-armv6l nodejs

apt-tau hloov tshiab && apt-tau upgrade

apt-get install build-essential

ln -s/opt/nodejs/bin/node/usr/bin/node

ln -s/opt/nodejs/bin/node/usr/bin/nodejs

ln -s/opt/nodejs/bin/npm/usr/bin/npmexit

export PATH = $ PATH:/opt/nodejs/bin/

Txheeb koj Node.js thiab npm teeb tsa

pi@raspberrypi:/ $ node --version

v6.9.5 ib

pi@raspberrypi:/ $ npm -v

3.10.10

Nruab Blynk thoob ntiaj teb

sudo npm nruab blynk -library -g

sudo npm nruab onoff -g

Khiav lub neej Blynk tus thov (hloov YourAuthToken):

export PATH = $ PATH:/opt/nodejs/bin/

teeb tsa NODE_PATH

blynk-neeg siv YourAuthToken

Kauj Ruam 4: Kev Sib Txuas

Kev sib txuas

Raspberry Pi rau Relay

NPV = -

5V = + (tus pin nruab nrab)

GPIO2 = S

Txuas mus rau Teeb

x (Kuv kos hauv daim duab) (TSIS YOG) = Hlau los ntawm lub ntsaws

Y (Kuv kos hauv daim duab) (C) = Hlau mus rau lub teeb

Kuv tau txuas daim duab rau koj siv

Kauj Ruam 5: Kauj Ruam Kawg

Tam sim no koj yuav luag tiav txoj haujlwm.

Tam sim no mus rau Blynk app thiab Koj yuav tsum pom lub pob Ua si nyob rau saum kaum sab xis saum toj ntawm lub xov tooj ntawm tes thiab nyem rau ntawm qhov ntawd.

Nco ntsoov tias koj tau siv lub raspberry pi thiab txuas nrog coj, Tam sim no nyem rau ntawm lub pob hauv blynk app.

Tam sim no lub teeb yuav ON.

Tam sim no koj tau ua tiav qhov kev qhia

Kauj Ruam 6: IOT Tsev

Tam sim no koj tau ua tiav Txoj Haujlwm.

Koj tseem tuaj yeem tswj hwm cov khoom siv hluav taws xob yog tias koj xav tau, los ntawm kev ntxiv ntau cov pob zeb blynk.

Ua tsaug rau Kev Kawm qhov project nrog kuv

Yog tias koj muaj kev ua xyem xyav email rau tus lej hauv qab no, E-mail: [email protected]

Pom zoo: