Cov txheej txheem:
- Khoom siv
- Kauj Ruam 1: Soldering Tus Qauv Kub
- Kauj Ruam 2: Tsim Peb Lub DCDC Converter Cable
- Kauj Ruam 3: Txhim Kho Koj Tus Surfstick
- Kauj Ruam 4: Tsim PostgreSQL Database
- Kauj ruam 5: Npaj SD Card
- Kauj Ruam 6: Txhim Kho Raspberry thiab Txuas Rau Nws Ntawm SSH
- Kauj Ruam 7: Txhim Kho Lub Logger
- Kauj Ruam 8: Txhim Kho Lub Logger (Cov Qauv Kub)
- Kauj Ruam 9: Rub tawm thiab Kho Pyhton Script
- Kauj Ruam 10: Txhim Kho WittyPi Module
- Kauj Ruam 11: Ua Qee Qhov Hloov pauv hauv Java Virtual Machine Setup
- Kauj Ruam 12: Teem Cron Txoj Haujlwm
- Kauj Ruam 13: Muab Txhua Qhov Ua Ke
- Kauj Ruam 14: Kev Txhim Kho zaum kawg
Video: Tsis Siv Neeg Dej Dej Saib Xyuas Dej: 14 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Lub tsev kawm ntawv no yog siv los sau cov kev txhim kho ntawm cov txheej txheem dej xyuas dej tsis siv neeg. Cov kev ntsuas ntsuas yog qib dej thiab dej kub. Lub hom phiaj ntawm txoj haujlwm no yog txhawm rau txhim kho tus nqi qis thiab tus neeg logger ywj pheej uas txuas nrog lub hauv paus. Cov dej tau soj ntsuam nrog qib tshwj xeeb QR-qib. Lub koob yees duab hauv Pi tau thaij duab txhua 15 feeb. QR-cov lej hauv daim duab no tau txiav txim siab los ntawm software thiab yog qhia txog qib dej tiag. Dej kub ntsuas nrog tus ntsuas DS18B20.
Khoom siv
- Raspberry Zero WH
- WittyPi Mini
- Raspberry Pi Lub Koob Yees Duab Module v2.1
- Huawei E3531 SurfStick
- SIM Card (ThingsMobile)
- DC DC Step Down Buck Buck Converter
- DS18B20 Cov Ntsuas Kub
- OTG micro USB cable
- Ib lub micro USB cable kawg
- Qhov rai glas
- Cov ntaub thaiv npog (G258)
- Kev txuas kab
- Srew Terminal Thaiv 3-pin
- 4, 7 kOhm resistor
- Blank Circuit Board 65x30mm
- 40-pin staking-header
- 4 x M3x20 srews
- 8 x3mc ua
- Xov tooj xov tooj
- Hais lus cable
Kauj Ruam 1: Soldering Tus Qauv Kub
Hauv theem no peb tsim qhov ntsuas kub los ntawm kos. Nws muaj qhov loj me ntawm pHAT thiab tuaj yeem txuas nrog 40-pin GPIO ntawm Pi. Txoj hauv kev no tso cai rau peb kom ruaj ntseg teeb tsa lub DS18B20 sensor mus rau Raspberry Pi.
- Ua ntej tshaj, peb yuav tsum tau muab cov kab 40-pin staking-header rau ntawm 60x35 mm daim phiaj hluav taws xob dawb.
- Muab cov ntsia hlau dav hlau thaiv thiab tus tiv thaiv nyob rau hauv qhov chaw raws li qhia hauv daim duab
- Txuas tus tiv thaiv mus rau sab pins ntawm lub davhlau ya nyob twg thaiv
- Solder tus resistor thiab pins ua ke
- Muab cov kab xev (dub, liab thiab daj) rau tus pin tseeb ntawm lub taub hau staking thiab rau tus pin ntawm lub davhlau ya nyob twg thaiv
- Txhawm rau txhawm rau txhawm rau txhim kho qhov, ua ntej teeb tsa tus qauv rau koj tus raspberry pi xoom, tom qab ntawd laum nrog 3mm laum me ntsis los ntawm qhov uas twb muaj lawm los ntawm koj tus Raspberry Pi rau hauv koj qhov tshiab.
- Thaum kawg, koj tuaj yeem txuas koj lub DS18B20 sensor rau koj qhov qauv los ntawm kev txuas cov hlua ntawm koj lub sensor rau cov xim sib xws ntawm koj lub rooj tsavxwm.
Kauj Ruam 2: Tsim Peb Lub DCDC Converter Cable
Txhawm rau txhawb peb Raspberry Pi peb yuav tsum hloov 12V peb tau txais los ntawm peb lub roj teeb mus rau 5V. Peb siv DC DC hloov pauv pob los txo qhov hluav taws xob.
- Muab cov xaim dub ua rau koj hais lus cable rau qhov chaw nres nkoj sau npe GND
- Muab cov xaim liab txuas rau qhov chaw nres nkoj sau IN+
- Siv cov xaim dub los ntawm koj lub micro-USB cable mus rau qhov chaw nres nkoj sau tias GND
- Siv cov xaim liab los ntawm koj lub micro-USB cable mus rau qhov chaw nres nkoj sau OUT+
- Txiav ntawm Circuit Court cim nrog tus xub liab hauv daim duab
- Weld cov khoom sib txuas ua ke kom tau txais 5V cov zis tas (xub xiav)
Kauj Ruam 3: Txhim Kho Koj Tus Surfstick
Txhawm rau tsim kev sib txuas hauv is taws nem, peb yuav tsum txuas peb lub nthwv dej txuas rau peb Raspberry Pi. Ua ntej peb yuav tsum tau ua qee qhov kev teeb tsa:
- Ntxig ib daim npav SIM los ntawm tus muab kev pabcuam moblie uas koj xaiv, rau hauv koj lub nthwv dej nthwv dej. Hauv qhov piv txwv no peb siv SIM los ntawm Yam Txawb.
- Txuas koj lub nthwv dej lo rau koj lub khoos phis tawj ntawm USB.
- Lub qhov rai yuav tsum pop-up hauv koj tus browser.
- Hauv qab Chaw> Kev tswj hwm tus kheej hloov pauv APN mus rau ib qho ntawm koj tus muab kev pabcuam mobile. Rau Yam Txawb nws yog "TM".
- Pab kom lub roaming feature nyob rau hauv Chaw> Txuas Txuas Txuas thiab 'Qhib' Cov ntaub ntawv Txawb.
- Nyem Thov.
- Ntawm Lub Tsev nplooj ntawv koj tuaj yeem tshawb xyuas yog tias muaj kev sib txuas.
- Tam sim no koj zoo mus, disconnect koj nthwv dej nthwv dej.
- Cov nthwv dej tuaj yeem txuas nrog koj li Raspberry yam tsis muaj teeb tsa ntxiv.
Kauj Ruam 4: Tsim PostgreSQL Database
Hauv cov kauj ruam no peb teeb tsa peb cov database. Peb siv cov qib pub dawb los ntawm Amazon Web Services.
- Thawj zaug tsim tus as khauj dawb ntawm AWS:
- Ua raws cov ntawv qhia no los tsim koj li PostgreSQL database thiab kawm txuas nws li cas:
Kauj ruam 5: Npaj SD Card
Ua ntej koj yuav tsum rub tawm Raspian Stretch Lite duab:
Rub tawm Raspberry Pi
Tam sim no peb yuav tsum nyem cov duab ntawm daim npav SD tsis muaj dab tsi (tsawg kawg 16 GB). Ntxig daim npav SD rau hauv koj daim npav SD daim npav. Rub tawm Balena Etcher thiab nruab nws hauv koj lub computer:
www.balena.io/etcher/
Qhib Balena Etcher, xaiv cov ntawv.zip ntawm koj li duab Raspian uas koj tau rub tawm ua ntej. Xaiv koj daim npav SD hauv Xaiv Tsav. Nyem nyem!
Kauj Ruam 6: Txhim Kho Raspberry thiab Txuas Rau Nws Ntawm SSH
Ua ntej peb tuaj yeem siv peb Raspberry Pi peb yuav tsum tau ua qee qhov pib teeb tsa.
- Ntxig koj daim npav SD rau hauv koj li Raspberry Pi thiab txuas nws mus rau tus saib xyuas, keyboard thiab nas. (Yog tias koj tsis muaj tus saib xyuas ntxiv, keyboard thiab nas koj tuaj yeem teeb tsa lub taub hau. Saib nws nws tau ua tiav lawm)
- Ua raws cov txheej txheem teeb tsa ntawm koj li Raspberry Pi [wifi, lus, sijhawm sijhawm]
- Pab kom SSH ntawm Terminal rau koj PI: sudo raspi-configgo rau: 5 Kev Sib Txuas Xaiv
-
Rub tawm Termius ntawm koj lub computer. Txoj haujlwm no ua kom yooj yim txuas rau peb Raspberry Pi ntawm SSH.1. https://termius.com/2. Ua tus account
3. Tsim TSHIAB HOST4. Muab koj daim ntawv Raspberry (xaiv Lub Npe) 5. Nkag mus rau koj li PI's IP-ADRESSE los ntawm NETWORK nws tau nkag mus (yog tias koj tsis paub IP-ADRESSE koj tuaj yeem nrhiav nws nrog qhov program hu ua "ADVANCED IP SCANNER") 7. Sau koj lub npe siv (pi yog lub hauv paus yog tias tsis hloov) 8. Sau koj tus password (raspberry los ntawm lub neej ntawd yog tias tsis hloov) 9. Nyem rau txuag 10. Ob npaug nias rau koj tus tswv tsim tshiab 11. Cov lus pops -> nyem yog
Koj li Raspberry yuav tsum txuas nrog koj lub khoos phis tawj ntawm SSH
Kauj Ruam 7: Txhim Kho Lub Logger
- Pab kom lub koob yees duab nyob hauv kev cuam tshuam kev xaiv: sudo raspi-configgo mus rau: 5 Kev cuam tshuam kev xaiv
- Tsim cov npe tshiab hauv koj /tsev /pi directorycd /home /pisudo mkdir Desktop
- Tsim cov ntaub ntawv nab npawb tshiab hauv Desktop directorycd Desktopsudo nano ctrl+ocall cov ntawv qrbooftemp.pyenterctrl+x
- Nruab pob pyboof (cov lej thiab py4j tau txais kev teeb tsa ncaj qha) qhov no tuaj yeem siv sijhawm ntev txog 40 min.sudo pip3 nruab pyboof == 0.33.1
- Khiav qhov hloov tshiab (yog tias koj tsis ua qhov no koj yuav tau txais teeb meem thaum txhim kho pob khoom tom qab) sudo apt-tau hloov tshiab apt-tau nruab libpq-dev
- Nruab postgreSQL thiab psycopg2 los cuam tshuam nrog postgreSQL database ntawm Pythonsudo apt-tau nruab postgresqlsudo pip3 nruab psycopg2
Kauj Ruam 8: Txhim Kho Lub Logger (Cov Qauv Kub)
Txhawm rau teeb tsa Tus Qauv Kub Kub koj yuav tsum tau teeb tsa Module ntawm koj li Raspberry Pi nrog lub DS18B20 sensor txuas rau nws. Tus qauv tau teeb tsa ntawm 40-tus pin header.
- pab kom 1-xaim hauv kev cuam tshuam kev xaiv sudo raspi-configgo mus rau: 5 Kev cuam tshuam cuam tshuam Xaiv tau 1-Wiresudo reboot
- teeb 1-Hlau tus pin rau tus pin 23 thiab gpu_mem = 256sudo nano /boot/config.txt txuas ntxiv dtoverlay = w1-gpio, gpiopin = 23, rub tawm = mus rau qhov kawg ntawm kev hloov pauv file gpu_mem = 128 rau gpu_mem = 256
- qhib 1-Wiresudo modprobe w1-gpiosudo modprobe w1-thermsudo reboot
- nrhiav pom koj qhov chaw nyob ntawm koj DS18B20, nws yuav tsum pib nrog 28-… cd/sys/bus/w1/deviceslswrite adress down, nws tom qab xav tau hauv Python tsab ntawv
Kauj Ruam 9: Rub tawm thiab Kho Pyhton Script
- Rub tawm Python tsab ntawv ntawm koj lub khoos phis tawj thiab qhib nws hauv cov ntawv nyeem
- Luam tsab ntawv ua tiav rau koj lub rooj tsav xwm kab ntawv (ctrl+a, ctrl+c)
- Mus rau koj yav tas los tsim nab hab sej filecd/tsev/pi/Desktopsudo nano qrbooftemp.py
- Ua ib txoj cai nias kom ntxig tsab ntawv
- Hloov qhov ntsuas kub nyob rau qhov uas koj tau sau yav dhau los
- Hloov qhov teeb tsa kev sib txuas postgresql rau koj cov ntaub ntawv tshwj xeeb, raws li qhia hauv tsab ntawv
- Txuag thiab tawmctrl+oenterctrl+x
Kauj Ruam 10: Txhim Kho WittyPi Module
- Rub tawm cov ntawv teeb tsa los ntawm Witty Pi wget
- Khiav cov ntawv teeb tsa sudo sh installWittyPi.sh
- Reboot sudo reboot
Kauj Ruam 11: Ua Qee Qhov Hloov pauv hauv Java Virtual Machine Setup
Cov kauj ruam no yog qhov tsim nyog kom ntseeg tau tias JVM yuav pib thaum cov ntawv ua nab npawb ua tiav.
- Mus rau qhov chaw py4j thiab qhib jawa_gateway.py cd /usr/local/lib/python3.5/dist-packages/py4jsudo nano jawa_gateway.pyset DEFAULT_CALLBACK_SERVER_ACCEPT_TIMEOUT = 20
- Mus rau phau ntawv teev npe pyboof thiab qhib _init _. Pycd /usr/local/lib/python3.5/dist-packages/pyboofsudo nano _init _. Pyset thaum time.time () - start_time <20.0
Kauj Ruam 12: Teem Cron Txoj Haujlwm
Hauv theem no peb teeb tsa cronjob thaum khau raj Raspberry. Txoj kev no txhua zaus Pi tau sawv los, peb cov ntawv nab nab tau ua tiav.
- Teeb cronjob thiab sau nws rau hauv cov ntaub ntawv teev cia. Qhov no ua rau teeb meem daws teeb meem ntau dua.crontab -e@reboot pw tsaug zog 20 && sudo python3 /home/pi/Desktop/qrbooftemp.py >> /home/pi/Desktop/log.txt
- Ntxiv lwm txoj kab rau crontab. Kab no ua kom ntseeg tau, tias thaum WittyPi ua tsis tiav Raspberry Pi reboots lawm.@Reboot pw tsaug zog 1500 && sudo rebootctrl+oenterctrl+x
Kauj Ruam 13: Muab Txhua Qhov Ua Ke
- Nco ntsoov tias koj tus Pi raug tso tseg, yog tias tsis yog, kaw nws qhov kaw -h tam sim no
- Khaws koj WittyPi ntawm koj Raspberry Pi thiab qhov ntsuas kub nyob saum nws.
- Ntsia 3 modules ua ke
- Txuas lub koob yees duab module rau CSI chaw nres nkoj ntawm raspberry pi xoom
- Txuas koj lub surfstick rau koj Raspberry Pi ntawm USB OTG cable
- Txuas lub hwj huam txuas mus rau WittyPi (tsis yog rau Raspberry Pi!)
- Muab txhua yam tso rau hauv lub casing thiab ntswj lub hau tawm
- Txuas lub hwj huam txuas rau koj lub roj teeb
- Nrog koj zoo siab logger yuav tsum tau khiav!
Kauj Ruam 14: Kev Txhim Kho zaum kawg
Cov duab no qhia pom lub logger mounted nrog QR-code dej theem tau teeb tsa.
Cov loggers tau teeb tsa hauv qab tus choj kom pom tau zoo. Kev tshav ntuj ncaj qha yuav tsum zam.
Pom zoo:
Tsis Siv Neeg Tsob Ntoo Dej Dej Siv Micro: ntsis: 8 Kauj Ruam (nrog Duab)
Tsis Siv Neeg Tsob Ntoo Dej Dej Siv Micro: me ntsis: Hauv Cov Lus Qhia no, Kuv tab tom yuav qhia koj yuav ua li cas txhawm rau tsim lub tshuab cog dej tsis siv neeg siv Micro: me ntsis thiab qee qhov lwm yam khoom siv hluav taws xob me me.Micro: ntsis siv lub ntsuas dej noo los saib xyuas cov dej noo nyob hauv cov av cov av thiab
Tsis Siv Neeg Tshuab Luam Ntawv Tsis Siv Neeg Gumball: 18 Kauj Ruam (nrog Duab)
Tsis Siv Neeg Tshuab Luam Ntawv Tsis Siv Neeg Gumball: Peb tau Ua Kov Tsis Pub Siv Gumball Siv lub micro: me ntsis, Crazy Circuits Bit Board, ntsuas qhov deb, siv servo, thiab duab los qhia. Ua nws thiab siv nws yog "BLAST" "! ? ? Thaum koj tso koj txhais tes rau hauv lub hauv paus ntawm lub foob pob hluav taws, lub ntsuas qhov deb
Dej Tswb Tswb Dej /Saib Xyuas Dej Dej: 6 Kauj Ruam
Dej Tswb Tswb Dej /Saib Xyuas Dej Dej: Peb Yuav Tsum Haus Dej Kom Muaj Dej Txhua Hnub kom txaus noj qab nyob zoo rau peb tus kheej. Tsis tas li muaj ntau tus neeg mob uas tau hais kom haus qee qhov tshwj xeeb ntawm cov dej txhua hnub. Tab sis hmoov tsis peb plam lub sijhawm yuav luag txhua hnub. Yog li kuv tsim
WiFi Tsis Siv Neeg Tsob Nroj Tsiaj Pub Nrog Cov Chaw Tso Dej - Sab Hauv Tsev/Sab Nraud Kev Cog Qoob Loo - Cov Nroj Tsuag Dej Tuaj Nrog Kev Saib Xyuas Chaw Nyob: 21 Kauj Ruam
WiFi Tsis Siv Neeg Cog Tsob Nroj Tsiaj Nrog Cov Chaw Tso Dej - Sab Hauv Tsev/Sab Nraud Kev Cog Qoob Loo - Cov Nroj Tsuag Dej Tuaj Nrog Kev Saib Xyuas Tej Zaum: Hauv qhov kev qhia no peb yuav nthuav qhia yuav ua li cas teeb tsa kev cai nyob sab hauv tsev/sab nraum zoov cog cog cog uas tuaj yeem tso dej nroj tsuag thiab tuaj yeem saib xyuas nyob deb ntawm kev siv Adosia platform
Cov Lus Ceeb Toom Txog Dej Nyab - Cov Dej Dej + IoT Sensor Saib Xyuas Phau Ntawv Qhia: 6 Cov Kauj Ruam
Cov Lus Ceeb Toom Txog Dej Nyab - Cov Dej Dej + IoT Sensor Phau Ntawv Qhia Saib Xyuas: Koj puas xav tau los saib xyuas cov qib dej? Cov Khoom Siv IoT no tau siv los ua kev ceeb toom txog dej nyab hauv Asmeskas. Txhawm rau kom koj thiab koj lub zej zog muaj kev nyab xeeb, Lub Nroog Ntsej Muag yuav tsum tau