Cov txheej txheem:
- Kauj Ruam 1: Txhim Kho Qhov Kub Kub Sensor
- Kauj Ruam 2: Pab I2C Bus
- Kauj ruam 3: Hloov kho Config.txt
- Kauj Ruam 4: Teem I2C Module kom thauj khoom ntawm khau raj
- Kauj ruam 5: Nruab I2C Pob
- Kauj Ruam 6: Datalogger Program
- Kauj Ruam 7: Saib Cov Ntaub Ntawv
- Kauj Ruam 8: Kev Sau Npe Tom Qab
Video: Raspberry Pi Kub Logger: 8 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Nov yog cov lus qhia txhawm rau txhim kho qhov ntsuas kub yooj yim siv tus nqi $ 5.00 I2C ntsuas kub. Cov ntaub ntawv khaws cia rau hauv SD daim npav thiab tuaj yeem yooj yim nkag mus rau hauv kev ua tau zoo. Yooj yim los ntawm kev hloov lossis ntxiv lwm yam kev ntsuas lwm hom ntaub ntawv kuj tseem tuaj yeem sau tau. Cov khoom siv hauv qab no tau siv rau txoj haujlwm no: Raspberry Pi (tib lub tshuab computer) Kub Sensor (SF-SEN-11931)
Solderless Breadboard Hookup Wires Zagros Raspberry Pi 2 cov khoom siv pib tseem suav nrog txhua yam xav tau rau txoj haujlwm no tshwj tsis yog ntsuas kub!
Kauj Ruam 1: Txhim Kho Qhov Kub Kub Sensor
Ua ntej tshaj, cov kab laug sab laug los yog cov xov hlau txuas rau lub sensor. Peb siv lub taub hau yog li nws yuav tuaj yeem yooj yim ntsaws lub sensor rau hauv lub khob cij.
Ua cov kev txuas hauv qab no mus rau Raspberry Pi GPIO chaw nres nkoj. Qhov txuas ADD0 rau hauv av txiav txim siab lub cuab yeej I2C chaw nyob. Ntau tshaj ib lub cim tuaj yeem txuas nrog I2C npav, tab sis lawv txhua tus yuav tsum muaj qhov chaw nyob tshwj xeeb. Sensor RPi GPIO VCC +3.3V SDA SDA SCL SCND GND GND ADD0 GND (nco qhov no teev I2C chaw nyob ntaus ntawv) ALT N/C NCO NTSOOV: Tsis txhob txuas lub VCC mus rau +5VDC, qhov no yuav ua rau lub tsev puas tsuaj
Kauj Ruam 2: Pab I2C Bus
*** Cov ntawv tshiab yuav tsis xav tau cov theem no. Yog tias cov ntaub ntawv tsis muaj, txav mus rau theem tom ntej.
Ua ntej lub tsheb npav I2C yuav tsum tau qhib.
Muaj ob txoj hauv kev los pab kom lub npav I2C
Thawj zaug thiab yooj yim tshaj plaws yog ua nws nrog cov khoom siv raspi-teeb tsa.
Siv qhov hais kom ua sudo raspi-teeb tsa los pib ua haujlwm.
Xaiv qhov Advanced Option kom qhib lub npav.
Qhov thib ob, tab sis txoj hauv kev nyuaj dua yog ua nws tus kheej
Txhawm rau ua qhov no, kho cov ntaub ntawv teeb tsa /etc/modprobe.d/raspi-blacklist.conf Siv cov lus txib: sudo nano /etc/modprobe.d/raspi-blacklist.conf Tam sim no hloov cov ntaub ntawv txheem los ntawm:# blacklist spi thiab i2c los ntawm lub neej ntawd (ntau tus neeg siv tsis xav tau lawv) blacklist spi-bcm2708 blacklist i2c-bcm2708 Txog qhov no: # blacklist spi thiab i2c los ntawm lub neej ntawd (ntau tus neeg siv tsis xav tau lawv) blacklist spi-bcm2708 #blacklist i2c-bcm2708
Kauj ruam 3: Hloov kho Config.txt
Khiav cov lus txib hauv qab no los hloov kho config.txt
sudo nano /boot /config.txt
Ntxiv cov kab hauv qab no rau hauv cov ntawv:
dtparam = i2c1 = rau
dtparam = i2c_arm = rau
Kauj Ruam 4: Teem I2C Module kom thauj khoom ntawm khau raj
I2C tus qauv yuav tsum tau teeb tsa thaum Raspberry Pi pib. Ua qhov no los ntawm kev kho cov ntaub ntawv /etc /modules. Cov lus txib hauv qab no tuaj yeem siv los kho cov ntaub ntawv no: sudo nano /etc /modules Ntxiv kab hauv qab no mus rau qhov kawg ntawm cov ntawv: i2c-bcm2708 i2c-dev
Kauj ruam 5: Nruab I2C Pob
Nruab i2c-cov cuab yeej thiab sej-smbus pob kom ua tiav I2C teeb tsa: Cov lus txib hauv qab no tuaj yeem siv los teeb tsa pob: sudo apt-tau nruab i2c-cov cuab yeej sudo apt-tau nruab sej-smbus Thaum kawg ntxiv tus neeg siv pi (lossis xijpeem tus ID nkag mus xav tau) rau I2C nkag pab pawg. Cov lus txib hauv qab no tuaj yeem siv los ua kom tiav qhov no: sudo adduser pi i2c Siv cov lus txib hauv qab no kom pom cov cuab yeej txuas nrog I2C npav: i2cdetect -y 1 Nco tseg: siv cov lus txib hauv qab no yog tias koj siv tus qauv A Raspberry Pii2cdetect -y0 I2C chaw nyob (hauv hexadecimal) ntawm qhov ntsuas kub yuav tsum tshwm yog tias txuas tau zoo.
Kauj Ruam 6: Datalogger Program
Thauj khoom thiab ua haujlwm piv txwv siv cov lus txib hauv qab no: nab hab sej temp_logger.py Cov piv txwv txoj haujlwm yooj yim heev: Nws nyeem qhov ntsuas kub los ntawm qhov ntsuas kub txhua txhua 60 vib nas this thiab teev nws mus rau cov ntawv sau (Tempdata.txt)
Kauj Ruam 7: Saib Cov Ntaub Ntawv
Siv cov lus txib hauv qab no los saib cov ntaub ntawv raw: nano tempdata.txt Luam cov ntaub ntawv mus rau USB tsav thiab nws tuaj yeem yooj yim raug xa mus rau hauv Excel:
Kauj Ruam 8: Kev Sau Npe Tom Qab
Txhawm rau khiav lub logger hauv keeb kwm yav dhau (nws yuav ua haujlwm tom qab koj tawm). Siv cov lus txib hauv qab no: sudo python temp_logger.py & (Txoj Kev Txheeb Ze) Muaj cov xwm txheej uas cov lus txib saum toj no tuaj yeem ua yuam kev, xws li Python: qhib tsis tau cov ntaub ntawv 'temp_logger.py': [Errno 2] tsis muaj cov ntaub ntawv ntawd lossis cov npe
Qhov no yooj yim txhais tau tias koj yuav tsum tau siv txoj hauv kev tsis meej, uas txhais tau tias koj yuav tsum qhia qhov chaw ntawm cov ntawv los ntawm cov hauv paus hauv paus. Ib txoj hauv kev yooj yim los ua qhov no yog txhawm rau nyem rau ntawm koj cov ntaub ntawv temp_logger.py, luam txoj hauv kev thiab muab tso rau hauv koj lub davhlau ya nyob twg thiab tom qab ntawd ntaus "nab nab" nyob rau ntawm nws.
Nov yog qhov kuv hais kom ua zoo li cas; nab nab /home/pi/Desktop/temp_logger.py
Pom zoo:
Ua Koj Tus Kheej Txuas Cov Cua Kub Kub thiab Txuag Nrog Cua Kub: 53 Cov Kauj Ruam (nrog Duab)
Ua Koj Tus Kheej Txuas Cov Cua Kub Kub thiab Txuag Nrog Cua Kub: Lub hom phiaj yog dab tsi? Ua kom yooj yim dua los ntawm kev ua kom sov koj lub tsev raws nraim qhov koj xav Ua kom txuag nyiaj thiab txo cov pa roj carbon tsev tso cua sov los ntawm cua sov koj lub tsev tsuas yog thaum koj xav tau Kev tswj hwm koj cov cua sov nyob txhua qhov chaw koj zoo siab koj tau ua nws y
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 - Saib Xyuas Qhov Kub Kub & Qhov Kub Kub ntawm M5stick-C Nrog DHT11: 6 Cov Kauj Ruam
ESP32 Raws M5Stack M5stick C Huab Cua Saib Nrog DHT11 | Saib Xyuas Qhov Kub thiab Qhov Ntsuas Kub ntawm M5stick-C Nrog DHT11: Nyob zoo cov neeg, hauv cov lus qhia no peb yuav kawm paub yuav ua li cas cuam tshuam DHT11 ntsuas kub nrog m5stick-C (pawg tswj hwm kev txhim kho los ntawm m5stack) thiab tso tawm ntawm cov zaub ntawm m5stick-C. Yog li hauv qhov kev qhia no peb yuav nyeem qhov ntsuas kub, av noo & heat kuv
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: 5 Kauj Ruam
Yuav Ua Li Cas Siv DHT11 Kub Sensor Nrog Arduino thiab Luam Kub Kub thiab Vaum: Lub DHT11 sensor tau siv los ntsuas kub thiab av noo. Lawv yog cov khoom siv hluav taws xob nrov tshaj plaws.Qhov DHT11 cov av noo thiab ntsuas kub ua rau nws yooj yim ntxiv cov av noo thiab ntsuas kub rau koj li DIY cov phiaj xwm hluav taws xob. Nws yog rau
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Kub Kub Nrog Steinhart-Hart Kho thiab Tswb Kub: 7 Kauj Ruam (nrog Duab)
ESP32 NTP Kev Ntsuas Kub Ua Haujlwm Ntsuas Kub nrog Steinhart-Hart Kev Kho thiab Tswb Kub: Tseem tab tom taug kev kom ua tiav "qhov haujlwm yuav los tom ntej", "ESP32 NTP Kev Ntsuas Kub Kev Ntsuas Kub Ua Noj Nrog Steinhart-Hart Kev Kho thiab Tswb Kub" yog Cov Ntawv Qhia qhia yuav ua li cas kuv ntxiv NTP ntsuas kub, piezo b
Qhov Rooj thiab Qhov Kub Kub Logger Project: 21 Kauj Ruam
Qhov Rooj thiab Qhov Kub Kub Logger Project: Cov lus qhia no yuav qhia koj yuav ua li cas thiaj ua tau lub qhov rooj yooj yim thiab ntsuas qhov ntsuas kub nyob hauv qis dua $ 10.00 siv ESP8266 NodeMCU, DHT11 qhov ntsuas kub thiab av noo, lub qhov rooj/qhov rai reed hloov, 10K ohm resistor thiab qee yam xov kab. Cov noob