Cov txheej txheem:

Tsis Siv Neeg Dej Dej Saib Xyuas Dej: 14 Kauj Ruam
Tsis Siv Neeg Dej Dej Saib Xyuas Dej: 14 Kauj Ruam

Video: Tsis Siv Neeg Dej Dej Saib Xyuas Dej: 14 Kauj Ruam

Video: Tsis Siv Neeg Dej Dej Saib Xyuas Dej: 14 Kauj Ruam
Video: Txhob Nco Kuv Lawm Nkauj Hmoob🌹Puas Coos Khem🌹Xis Thoj🌹official MV 2023 2024, Kaum ib hlis
Anonim
Tsis Siv Neeg Dej Dej Saib Xyuas Dej
Tsis Siv Neeg Dej Dej Saib Xyuas Dej
Tsis Siv Neeg Dej Dej Saib Xyuas Dej
Tsis Siv Neeg Dej Dej Saib Xyuas Dej

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

  1. Raspberry Zero WH
  2. WittyPi Mini
  3. Raspberry Pi Lub Koob Yees Duab Module v2.1
  4. Huawei E3531 SurfStick
  5. SIM Card (ThingsMobile)
  6. DC DC Step Down Buck Buck Converter
  7. DS18B20 Cov Ntsuas Kub
  8. OTG micro USB cable
  9. Ib lub micro USB cable kawg
  10. Qhov rai glas
  11. Cov ntaub thaiv npog (G258)
  12. Kev txuas kab
  13. Srew Terminal Thaiv 3-pin
  14. 4, 7 kOhm resistor
  15. Blank Circuit Board 65x30mm
  16. 40-pin staking-header
  17. 4 x M3x20 srews
  18. 8 x3mc ua
  19. Xov tooj xov tooj
  20. Hais lus cable

Kauj Ruam 1: Soldering Tus Qauv Kub

Soldering Tus Qauv Kub
Soldering Tus Qauv Kub
Soldering Tus Qauv Kub
Soldering Tus Qauv Kub
Soldering Tus Qauv Kub
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.

  1. Ua ntej tshaj, peb yuav tsum tau muab cov kab 40-pin staking-header rau ntawm 60x35 mm daim phiaj hluav taws xob dawb.
  2. Muab cov ntsia hlau dav hlau thaiv thiab tus tiv thaiv nyob rau hauv qhov chaw raws li qhia hauv daim duab
  3. Txuas tus tiv thaiv mus rau sab pins ntawm lub davhlau ya nyob twg thaiv
  4. Solder tus resistor thiab pins ua ke
  5. 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
  6. 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.
  7. 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

Tsim Peb DCDC Hloov Cable
Tsim Peb DCDC Hloov Cable
Tsim Peb DCDC Hloov Cable
Tsim Peb DCDC Hloov 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.

  1. Muab cov xaim dub ua rau koj hais lus cable rau qhov chaw nres nkoj sau npe GND
  2. Muab cov xaim liab txuas rau qhov chaw nres nkoj sau IN+
  3. Siv cov xaim dub los ntawm koj lub micro-USB cable mus rau qhov chaw nres nkoj sau tias GND
  4. Siv cov xaim liab los ntawm koj lub micro-USB cable mus rau qhov chaw nres nkoj sau OUT+
  5. Txiav ntawm Circuit Court cim nrog tus xub liab hauv daim duab
  6. Weld cov khoom sib txuas ua ke kom tau txais 5V cov zis tas (xub xiav)

Kauj Ruam 3: Txhim Kho Koj Tus Surfstick

Txhim Kho Koj Tus Surfstick
Txhim Kho Koj Tus Surfstick
Txhim Kho Koj Tus Surfstick
Txhim Kho Koj Tus Surfstick
Txhim Kho Koj Tus Surfstick
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:

  1. 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.
  2. Txuas koj lub nthwv dej lo rau koj lub khoos phis tawj ntawm USB.
  3. Lub qhov rai yuav tsum pop-up hauv koj tus browser.
  4. 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".
  5. Pab kom lub roaming feature nyob rau hauv Chaw> Txuas Txuas Txuas thiab 'Qhib' Cov ntaub ntawv Txawb.
  6. Nyem Thov.
  7. Ntawm Lub Tsev nplooj ntawv koj tuaj yeem tshawb xyuas yog tias muaj kev sib txuas.
  8. Tam sim no koj zoo mus, disconnect koj nthwv dej nthwv dej.
  9. 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.

  1. Thawj zaug tsim tus as khauj dawb ntawm AWS:
  2. 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.

  1. 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)
  2. Ua raws cov txheej txheem teeb tsa ntawm koj li Raspberry Pi [wifi, lus, sijhawm sijhawm]
  3. Pab kom SSH ntawm Terminal rau koj PI: sudo raspi-configgo rau: 5 Kev Sib Txuas Xaiv
  4. 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

  1. Pab kom lub koob yees duab nyob hauv kev cuam tshuam kev xaiv: sudo raspi-configgo mus rau: 5 Kev cuam tshuam kev xaiv
  2. Tsim cov npe tshiab hauv koj /tsev /pi directorycd /home /pisudo mkdir Desktop
  3. Tsim cov ntaub ntawv nab npawb tshiab hauv Desktop directorycd Desktopsudo nano ctrl+ocall cov ntawv qrbooftemp.pyenterctrl+x
  4. 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
  5. 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
  6. 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)

Txhim Kho Lub Logger (Cov Qauv Kub)
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.

  1. 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
  2. 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
  3. qhib 1-Wiresudo modprobe w1-gpiosudo modprobe w1-thermsudo reboot
  4. 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

  1. Rub tawm Python tsab ntawv ntawm koj lub khoos phis tawj thiab qhib nws hauv cov ntawv nyeem
  2. Luam tsab ntawv ua tiav rau koj lub rooj tsav xwm kab ntawv (ctrl+a, ctrl+c)
  3. Mus rau koj yav tas los tsim nab hab sej filecd/tsev/pi/Desktopsudo nano qrbooftemp.py
  4. Ua ib txoj cai nias kom ntxig tsab ntawv
  5. Hloov qhov ntsuas kub nyob rau qhov uas koj tau sau yav dhau los
  6. Hloov qhov teeb tsa kev sib txuas postgresql rau koj cov ntaub ntawv tshwj xeeb, raws li qhia hauv tsab ntawv
  7. Txuag thiab tawmctrl+oenterctrl+x

Kauj Ruam 10: Txhim Kho WittyPi Module

  1. Rub tawm cov ntawv teeb tsa los ntawm Witty Pi wget
  2. Khiav cov ntawv teeb tsa sudo sh installWittyPi.sh
  3. 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.

  1. 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
  2. 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.

  1. 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
  2. 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

Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
Muab Nws Tag Nrho Ua Ke
  1. Nco ntsoov tias koj tus Pi raug tso tseg, yog tias tsis yog, kaw nws qhov kaw -h tam sim no
  2. Khaws koj WittyPi ntawm koj Raspberry Pi thiab qhov ntsuas kub nyob saum nws.
  3. Ntsia 3 modules ua ke
  4. Txuas lub koob yees duab module rau CSI chaw nres nkoj ntawm raspberry pi xoom
  5. Txuas koj lub surfstick rau koj Raspberry Pi ntawm USB OTG cable
  6. Txuas lub hwj huam txuas mus rau WittyPi (tsis yog rau Raspberry Pi!)
  7. Muab txhua yam tso rau hauv lub casing thiab ntswj lub hau tawm
  8. Txuas lub hwj huam txuas rau koj lub roj teeb
  9. Nrog koj zoo siab logger yuav tsum tau khiav!

Kauj Ruam 14: Kev Txhim Kho zaum kawg

Kev Txhim Kho Kawg
Kev Txhim Kho Kawg
Kev Txhim Kho Kawg
Kev Txhim Kho 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: