Cov txheej txheem:

Tus Saib Xyuas Pi: 6 Cov Kauj Ruam (nrog Duab)
Tus Saib Xyuas Pi: 6 Cov Kauj Ruam (nrog Duab)

Video: Tus Saib Xyuas Pi: 6 Cov Kauj Ruam (nrog Duab)

Video: Tus Saib Xyuas Pi: 6 Cov Kauj Ruam (nrog Duab)
Video: Zoo Siab Nrog Koj - Paj Tsua Thoj [ Official MV ] Nkauj Tawm Tshiab 2022 2024, Kaum ib hlis
Anonim
Pi Tus Saib Xyuas
Pi Tus Saib Xyuas

Koj puas tau xav ntes tus neeg ntawd uas tseem nyiag koj cov khoom qab zib Xus? Los yog dab tsi txog tus phooj ywg hauv chav uas tsis txaus siab uas yuav tsis tawm ntawm koj lub tub yees ib leeg? Los ntawm kev siv Raspberry Pi 3, Pi Lub Koob Yees Duab, thiab PIR sensor, txhua yam tam sim no ua tau. Cias muab tso rau hauv qhov chaw koj xav tau saib xyuas thiab tau txais email nrog daim duab txuas ntawm tus neeg ua phem.

Kauj ruam 1: Yees duab

Image
Image

Kauj ruam 2: Teeb tsa Pi

Teeb tsa Pi
Teeb tsa Pi

DFRobot ncav tes rau kuv thiab xa lawv Raspberry Pi 3 thiab Raspberry Pi Lub Koob Yees Duab Module. Yog li tom qab kuv qhib lub thawv kuv tau txais txoj haujlwm los teeb tsa daim npav SD. Ua ntej kuv tau mus rau Raspberry Pi Downloads nplooj ntawv thiab rub tawm qhov tshiab tshaj plaws ntawm Raspbian. Tom qab ntawd kuv rho tawm cov ntawv thiab muab tso rau hauv cov npe yooj yim. Koj tsis tuaj yeem tsuas yog luam/muab cov ntawv.img tso rau hauv SD daim npav, koj yuav tsum "hlawv nws" mus rau daim npav. Koj tuaj yeem rub tawm cov khoom siv hluav taws xob zoo li Etcher.io kom yooj yim hloov OS cov duab. Tom qab cov ntaub ntawv.img nyob ntawm kuv daim npav SD kuv tso nws rau hauv Raspberry Pi thiab muab lub zog rau nws. Tom qab kwv yees li 50 vib nas this kuv tshem lub qaum thiab tshem daim npav SD. Tom ntej no kuv muab daim npav SD rov qab rau hauv kuv lub PC thiab mus rau phau ntawv "khau raj". Kuv tau qhib phau ntawv sau tseg thiab khaws nws ua cov ntaub ntawv tsis muaj npe hu ua "ssh" nrog TSIS txuas ntxiv. Kuj tseem muaj cov ntawv kuv ntxiv hu ua "wpa_supplicant.conf" thiab muab cov ntawv no tso rau hauv nws: network = {ssid = psk =} Tom qab ntawd kuv tau khaws thiab tshem daim npav thiab muab rov qab rau hauv Raspberry Pi 3. Tam sim no yuav tsum tso cai rau kev siv SSH thiab txuas rau WiFi.

Kauj Ruam 3: Npaj Lub Koob Yees Duab Npaj

Npaj Lub Koob Yees Duab Npaj
Npaj Lub Koob Yees Duab Npaj

Los ntawm lub neej ntawd, lub koob yees duab tau xiam ntawm Pi, yog li koj yuav tsum qhib lub davhlau ya nyob twg hom sudo raspi-teeb tsa los coj cov ntawv qhia zaub mov. Mus rau "kev xaiv cuam tshuam" thiab tom qab ntawd qhib lub koob yees duab. Tam sim no tsuas yog xaiv "Ua tiav" thiab ntxig cov hlua kab ntawm lub koob yees duab hloov mus rau thaj tsam raug ntawm Pi.

Kauj Ruam 4: Txuas lub PIR Sensor

Txuas lub PIR Sensor
Txuas lub PIR Sensor

Lub PIR sensor sawv rau Passive InfraRed, uas ib txwm txhais tau tias nws tuaj yeem ntsuas cua sov, thiab yog li tib neeg txav mus rau ntawm nws. Tsuas muaj 3 txoj hauv kev los txuas: VCC, GND, thiab OUTPUT. VCC tau txuas nrog 3.3V, GND rau GND ntawm chav kawm, thiab OUTPUT rau tus pin 4 (BCM tus lej) ntawm Pi.

Kauj ruam 5: Txoj Cai

Kuv tau txuas cov cai rau nplooj ntawv no, yog li txhua yam koj yuav tsum ua yog luam/muab nws tso, tab sis nrog ib tus ntes. Nws tsis yog kev coj ua zoo los khaws cov password hauv cov ntawv yooj yim, cia nyob ib leeg tus lej tus lej tseem ceeb. Yog li ntawd, koj tuaj yeem mus rau Google Accounts nplooj ntawv thiab xaiv kev nyab xeeb, tom qab ntawd lo lus zais app. Ntxiv qhov tshiab hu ua "Raspberry Pi Email" thiab luam/muab tus lej 16 tus lej nkag mus rau hauv tus lej. Qhov no tso cai rau koj tshem tus password tom qab koj ua tiav nrog nws, txhim kho kev nyab xeeb. Kuj nkag mus rau email chaw nyob rau koj tus lej Google uas koj siv los teeb tsa tus lej app.

Kauj Ruam 6: Khiav Nws

Khiav Nws
Khiav Nws

Tam sim no tsuas yog siv txoj cai los ntawm kev ntaus sudo nab hab sej.py Kuv teeb kuv lub cuab yeej hla ntawm kuv cov khoom tshiab ntawm Xus khoom qab zib los saib xyuas yog tias ib tus neeg tab tom sim nyiag nws.

Pom zoo: