Cov txheej txheem:
- Kauj Ruam 1: Cov khoom siv
- Kauj ruam 2: Circuit Court Assembly
- Kauj ruam 3: Python Code
- Kauj Ruam 4: Rau Kev Txhawb Nqa
Video: Txheeb Xyuas Tsab Ntawv Siv Raspberry Pi: 4 Cov Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Hauv cov lus qhia no, peb yuav kawm paub yuav ua li cas peb tuaj yeem siv PIR (Passive InfraRed) Sensor nrog Raspberry Pi, txhawm rau txhawm rau tsim lub ntsuas hluav taws xob yooj yim. Lawv feem ntau siv nyob rau hauv tub sab tub nyiag lub tswb thiab tau qhib lub teeb pom kev zoo.
Cov txheej txheem ua haujlwm:
Txhua yam khoom uas muaj qhov kub siab tshaj pes tsawg tsis muaj cua sov tso rau hauv daim ntawv hluav taws xob. Feem ntau qhov hluav taws xob no tsis pom rau tib neeg lub qhov muag vim tias nws tawg ntawm lub ntsej muag lub ntsej muag, tab sis nws tuaj yeem kuaj pom los ntawm cov khoom siv hluav taws xob tsim los rau lub hom phiaj no. (Source: Wikipedia)
Lub hom phiaj ntawm kev qhia:
Lub tswv yim tseem ceeb ntawm qhov kev qhia no yog Qhib ON Led yog tias lub suab pom, thiab Tua Tawm Led yog lwm qhov. Raws li kuv tau hais hauv qhov kev qhia koj tuaj yeem siv lub ntsuas hluav taws xob los tswj Lub Teeb Lub Teeb lossis Tswb siv Led.
Kauj Ruam 1: Cov khoom siv
Khoom Kho Vajtse:
1. Raspberry Pi 3 Qauv B.
2. PIR Sensor
3. Cov qhob cij
4. 220 Ohms Resistor
5. LED
6. Cov xov hlau
Cov Khoom Siv Software:
1. Raspbian Jessie (Operating System of Raspberry Pi: yog xav paub ntau ntxiv koj tuaj yeem saib mus rau kuv cov lus qhia yav dhau los ntawm no).
2. Python IDLE
Yog li kuv xav tias koj tau ua tiav qee qhov haujlwm tseem ceeb. Yog tias tsis yog, tsis txhob txhawj xeeb kuv qhia koj kom ua raws li kuv cov lus qhia yav dhau los (Pib Koj Thawj Txoj Haujlwm Nrog Raspberry: Tsaus Ntsig LED)
Kauj ruam 2: Circuit Court Assembly
Txoj hlua yog yooj yim heev, PIR sensor muaj peb tus pin:
1. Vcc mus rau 5v ntawm Raspberry's GPIO.
2. GND rau GNS ntawm Raspberry's GPIO.
3. Tawm mus rau 17 GPIO tus pin.
Txhawm rau txuas lub LED thiab tus tiv thaiv koj tuaj yeem ua raws cov theem hauv qab no:
1. Txuas 220Ω resistor rau anode ntawm LED, tom qab ntawd tus tiv thaiv rau 5 V.2. Txuas lub cathode ntawm LED mus rau 4 GPIO tus pin (Saib daim duab saum toj no).
Kauj ruam 3: Python Code
1. Qhib koj tus Pi thiab Tsim cov ntawv sau tshiab “pir.py” (Koj tuaj yeem sau npe cov ntawv raws li koj nyiam).
2. Ntaus cov cai hauv qab no:
ntshuam RPi. GPIO ua GPIO
ntshuam sij hawm GPIO.setmode (GPIO. BCM) GPIO.setup (17, GPIO. IN) #PIR GPIO.setup (4, GPIO. OUT) #Led sim: time.sleep (2) #kom ruaj khov sensor thaum Muaj tseeb: i = GPIO.input (17) yog tias kuv == 0: #Thaum cov zis tawm los ntawm lub ntsuas suab qis LOW GPIO.output (4, 0) #Tau OFF LED luam tawm ("Tsis pom lub suab pom", i) elif i == 1: #Thaum twg cov zis los ntawm cov ntawv tsa suab yog HIGH GPIO.output (4, 1) #Turn ON LED print ("Tsab ntawv tsa suab pom", i) tshwj tsis yog: GPIO.cleanup ()
3. Thaum koj tau ntaus tag nrho cov cai kos tseg tseg.
4. Khiav tus nab npawb nab npawb los ntawm kev ntaus cov cai hauv qab no hauv lub davhlau ya nyob twg:
- cd Desktop thiab nias Enter (Kuv ntaus Desktop vim kuv tau khaws cov ntaub ntawv hauv pi's Desktop).
- nab hab sej pir.py thiab nias Enter.
Kauj Ruam 4: Rau Kev Txhawb Nqa
Koj tuaj yeem sau npe yuav rau kuv li YouTube channel rau kev qhia ntau ntxiv thiab phiaj xwm. Sau npe yuav txhawb nqa. Ua tsaug.
Mus rau kuv tus YouTube Channel -link
Pom zoo:
Txheeb Luam Tsis Muaj Software Tshwj Xeeb lossis Tshuab Luam Ntawv nrog MS Excel (Txheeb Xyuas Nyiaj Txiag Hauv txhab nyiaj): 6 Kauj Ruam
Txheeb Luam Tsis Muaj Software Tshwj Xeeb lossis Tshuab Luam Ntawv Nrog MS Excel (Txheeb Xyuas Nyiaj Txiag Nyiaj Txiag): Nov yog phau ntawv ua haujlwm yooj yim, uas yuav muaj txiaj ntsig zoo rau txhua lub lag luam los sau ntau cov txhab nyiaj hauv txhab nyiaj hauv ob rau lawv Cov Neeg Muag Khoom.yog koj tsis xav tau lub tshuab luam ntawv tshwj xeeb lossis software, tsuas yog koj xav tau yog khoos phis tawj nrog MS Excel thiab lub tshuab luam ntawv ib txwm.Yog, tam sim no koj tuaj yeem
Cov Ntaub Ntawv Huab Cua Siv Google Ntawv thiab Google Tsab Ntawv: 7 Kauj Ruam
Cov Ntaub Ntawv Huab Cua Siv Google Ntawv thiab Google Tsab Ntawv: Hauv Blogtut no, peb yuav xa cov ntawv nyeem ntawm SHT25 sensor mus rau google nplooj ntawv siv Adafruit huzzah ESP8266 uas pab xa cov ntaub ntawv mus rau is taws nem. thiab txoj hauv kev yooj yim uas txuag cov ntaub ntawv hauv
Siv Raspberry Pi, Txheeb Xyuas Cov Vaum thiab Kub Nrog SI7006: 6 Cov Kauj Ruam
Siv Raspberry Pi, Txheeb Xyuas Cov Vaum thiab Kub Nrog SI7006: Ua tus txhawb siab rau Raspberry Pi, peb xav txog qee qhov kev sim zoo tshaj plaws nrog nws. SI7006, Vaum thiab Kub hnov
RAWS LI COV NTAUB NTAWV NTSEEG NTAWV NTAWV MUAJ NTAWV TSHUAJ NTAWV TSO CAI RAU RASPBERRY PI: 6 Kauj Ruam (nrog Duab)
RAWS LI COV NTAUB NTAWV NTAWV MUAJ NTAWV TSHUAJ NTXIV RAU RASPBERRY PI: Hauv qhov haujlwm no, peb yuav txuas peb ntawm Atlas Scientific's EZO sensors (pH, yaj cov pa thiab kub) mus rau Raspberry Pi 3B+. Hloov chaw ntawm txuas cov kab hluav taws xob mus rau Raspberry Pi, peb yuav siv Whitebox Labs Tentacle T3 daim ntaub thaiv. T
Yuav Ua Li Cas Txheeb Xyuas Cov Ntaub Ntawv rau Qhov Kub, PH, thiab Cov Pa Dej Daws: 11 Kauj Ruam (nrog Duab)
Yuav Ua Li Cas Cov Ntaub Ntawv Logger rau Qhov Kub, PH, thiab Cov Pa Dej Dhuav: Lub Hom Phiaj: Ua cov ntaub ntawv logger rau ≤ $ 500. Nws khaws cov ntaub ntawv rau qhov ntsuas kub, pH, thiab ua nrog lub sijhawm thim thiab siv I2C kev sib txuas lus. Vim li cas I2C (Inter-Integrated Circuit)? Ib tus tuaj yeem teeb tsa ntau qhov kev ntsuas hauv tib kab ntawv uas txhua tus muaj